Skip to content

Commit

Permalink
Test calling mail only once
Browse files Browse the repository at this point in the history
We want to see if this fixes `Capybara::Node:Email.body` on
`alphagov/signon`
  • Loading branch information
yndajas committed Jul 30, 2024
1 parent 77c32c1 commit 8d4c1c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mail/notify/mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ def view_mail(template_id, options)

# we have to render the view for the message and grab the raw source, then we set that as the
# body in the personalisation for sending to the Notify API.
body = mail(headers).body.raw_source
# body = mail(headers).body.raw_source

# The 'view mail' works by sending a subject and body as personalisation options, these are
# then used in the Notify template to provide content.
message.personalisation = {subject: subject, body: body}
# message.personalisation = {subject: subject, body: body}

mail(headers) do |format|
format.text { nil }
Expand Down

0 comments on commit 8d4c1c3

Please sign in to comment.