docbrown/spec/helpers/feedback_messages_helper_spec.rb
Julianna Tetreault 945f0bebf4
Re-Add Reporter Email Form to /admin/reports (#13011) [deploy]
* Re-add Reporter email form and add heads up banner to admin/reports

* Adjusts spec expectations to read in a nicer way

* Pulls HEREDOCs out into constants and formats email bodys inline
 - Additionally, fixes inconsistent grammar within all email bodies
2021-03-22 08:19:05 -06:00

30 lines
908 B
Ruby

require "rails_helper"
RSpec.describe FeedbackMessagesHelper, type: :helper do
describe "#offender_email_details" do
it "has the proper subject and body" do
expect(helper.offender_email_details).to include(
subject: "#{SiteConfig.community_name} Code of Conduct Violation",
body: a_string_starting_with("Hello"),
)
end
end
describe "#reporter_email_details" do
it "has the proper subject and body" do
expect(helper.reporter_email_details).to include(
subject: "#{SiteConfig.community_name} Report",
body: a_string_starting_with("Hi"),
)
end
end
describe "#affected_email_details" do
it "has the proper subject and body" do
expect(helper.affected_email_details).to include(
subject: "Courtesy Notice from #{SiteConfig.community_name}",
body: a_string_starting_with("Hi"),
)
end
end
end