docbrown/spec/helpers/feedback_messages_helper_spec.rb
Ben Halpern 6c71369df5
[deploy] Add community_name to site config (#9864)
* Add community_name to site config

* Fix a spec

* Remove SiteConfig from constants

* Change subjects to method

* Fix subjects method

* Fix linting
2020-08-19 14:54:40 -04:00

30 lines
899 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: "#{SiteConfig.community_name} Code of Conduct Violation",
body: a_string_starting_with("Hello"),
)
end
end
describe "#reporter_email_details" do
it "have 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 "have 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