Skip to content

Commit

Permalink
mail confirmation post submission NEW tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syed87 committed May 30, 2024
1 parent 01a14bc commit 79456b8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/system/teacher_interface/authentication_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,24 @@ def and_i_receive_a_teacher_magic_link_email
"Confirm your email: apply for qualified teacher status (QTS)",
)
expect(message.to).to include("[email protected]")

email_body = message.body.raw_source
teacher = Teacher.find_by(email: "[email protected]")
if teacher.sign_in_count == 0
expect(email_body).to include(
"Thank you for your interest in applying for qualified teacher status (QTS) in England.",
)
expect(email_body).to_not include(
"Welcome back to apply for qualified teacher status (QTS) in England.",
)
else
expect(email_body).to include(
"Welcome back to apply for qualified teacher status (QTS) in England.",
)
expect(email_body).to_not include(
"Thank you for your interest in applying for qualified teacher status (QTS) in England.",
)
end
end

def when_i_sign_in_using_magic_link
Expand Down

0 comments on commit 79456b8

Please sign in to comment.