Skip to content

Commit

Permalink
test: DAH-3085 fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tallulahkay committed Feb 5, 2025
1 parent ebb12dd commit 5aeffad
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 39 deletions.
4 changes: 0 additions & 4 deletions spec/mailers/emailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@
let(:mail) { Emailer.submission_confirmation(@params) }

it 'renders the email' do
name = "#{@params[:firstName]} #{@params[:lastName]}"
text = 'We got your application.'
VCR.use_cassette('emailer/submission_confirmation_dalp') do
expect(mail.subject).to eq("We got your #{@listing_name} application")
expect(mail.to).to eq([@params[:email]])
expect(mail.from).to eq(['[email protected]'])
expect(mail.body.encoded).to match(name)
expect(mail.body.encoded).to match(text)
end
end
Expand Down Expand Up @@ -201,13 +199,11 @@
let(:mail) { Emailer.submission_confirmation(@params) }

it 'renders the email' do
greeting = 'Hello,'
text = 'We got your application.'
VCR.use_cassette('emailer/submission_confirmation_dalp') do
expect(mail.subject).to eq("We got your #{@listing_name} application")
expect(mail.to).to eq([@params[:email]])
expect(mail.from).to eq(['[email protected]'])
expect(mail.body.encoded).to match(greeting)
expect(mail.body.encoded).to match(text)
end
end
Expand Down
70 changes: 35 additions & 35 deletions spec/vcr/emailer/submission_confirmation_dalp.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5aeffad

Please sign in to comment.