Updated

spec/mailers / feedback_mailer_spec.rb

A
20 lines of codes
0 methods
N/A complexity/method
7 churn
38.9 complexity
0 duplications
require 'rails_helper' RSpec.describe FeedbackMailer, type: :mailer do describe "send_feedback" do let(:feedback) { Feedback.new(:email => "foo@example.com", :comment => "I love your site!") } let(:mail) { FeedbackMailer.send_feedback(feedback) } it "renders the headers" do expect(mail).to have_subject("Feedback from the Petitions service") end it "renders the body" do expect(mail).to have_body_text(feedback.comment) end it "sets the reply-to to be the email address" do expect(mail.reply_to).to eq([feedback.email]) end end end