docbrown/spec/helpers/feedback_messages_helper_spec.rb
Ridhwana 7bcacfa3a6
Update feedback messages to be general (#7373)
* feat: update feedback messages to be general

* spec: update the feedback test
2020-04-20 10:22:31 +02:00

21 lines
854 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: "#{ApplicationConfig['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: "#{ApplicationConfig['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 #{ApplicationConfig['COMMUNITY_NAME']}", body: a_string_starting_with("Hi"))
end
end
end