-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The tests that will check the featute is working well added. There are four test: 1. Checks that the emails are been send to the user. The test looks for the link in there and takes the token. Visits the page and changes the password. 2 and 3. Both change the password by hand. One uses a password written by the manager, whilst the other uses the 'Generate random password' option. Both tests check that the user can sign in with the new passwords. 4. Checks that the password can be printed when it is saved.
- Loading branch information
iagirre
committed
Apr 2, 2018
1 parent
ff872db
commit d84895b
Showing
2 changed files
with
92 additions
and
2 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
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 |
---|---|---|
|
@@ -14,6 +14,16 @@ def sign_up(email = '[email protected]', password = 'judgementday') | |
click_button 'Register' | ||
end | ||
|
||
def login_through_form_with_email_and_password(email='[email protected]', password='judgementday') | ||
visit root_path | ||
click_link 'Sign in' | ||
|
||
fill_in 'user_login', with: email | ||
fill_in 'user_password', with: password | ||
|
||
click_button 'Enter' | ||
end | ||
|
||
def login_through_form_as(user) | ||
visit root_path | ||
click_link 'Sign in' | ||
|