-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mail confirmation post submission NEW tests
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|