* Create more request specs * Update wording * Update guard to work with requests * Fix broken spec * Remove rails-controller-testing gem * Move article_specs * Move last controller spec out * Remove controller spec config * Fix broken spec * Remove all use of render_template * Refactor spec * Tweak User#remember_me * Create ArticleAnalyticFetcher spec * Undo User#remember_me * Use srand in rspec * Create FeedbackMessagesHelper spec * Add DigestMailer spec * Fix broken test
21 lines
746 B
Ruby
21 lines
746 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe FeedbackMessagesHelper, type: :helper do
|
|
describe "#offender_email_details" do
|
|
it "have proper subject and body" do
|
|
expect(helper.offender_email_details).to include(subject: "DEV Code of Conduct Violation", body: a_string_starting_with("Hi"))
|
|
end
|
|
end
|
|
|
|
describe "#reporter_email_details" do
|
|
it "have proper subject and body" do
|
|
expect(helper.reporter_email_details).to include(subject: "DEV Report", body: a_string_starting_with("Hi"))
|
|
end
|
|
end
|
|
|
|
describe "#affected_email_details" do
|
|
it "have proper subject and body" do
|
|
expect(helper.affected_email_details).to include(subject: "Courtesy Notice from DEV", body: a_string_starting_with("Hi"))
|
|
end
|
|
end
|
|
end
|