Skip to content

Commit

Permalink
Update alert_user_about_account_verified_spec
Browse files Browse the repository at this point in the history
These specs weren't actually testing the thing we thought they were, since the text_part of the email did not contain HTML.
  • Loading branch information
matthinz committed Dec 18, 2024
1 parent 9a1e3c7 commit 3dffdd8
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
expect_delivered_email(
to: [user.confirmed_email_addresses.first.email],
subject: t('user_mailer.account_verified.subject', app_name: APP_NAME),
body: ['<table class="button expanded large radius">', 'localhost:3000'],
body: [
'http://www.example.com/redirect/return_to_sp/account_verified_cta',
],
)
end
end
Expand All @@ -50,7 +52,9 @@
described_class.call(profile: profile)

email_body = last_email.text_part.decoded.squish
expect(email_body).to_not include('<table class="button expanded large radius">')
expect(email_body).to_not include(
'http://www.example.com/redirect/return_to_sp/account_verified_cta',
)
end
end

Expand All @@ -69,7 +73,7 @@
expect_delivered_email(
to: [user.confirmed_email_addresses.first.email],
subject: t('user_mailer.account_verified.subject', app_name: APP_NAME),
body: ['<table class="button expanded large radius">', 'http://example.com'],
body: ['http://example.com'],
)
end
end
Expand Down

0 comments on commit 3dffdd8

Please sign in to comment.