forked from activeadmin/activeadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresetting_password.feature
32 lines (27 loc) · 1.25 KB
/
resetting_password.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Feature: User Resetting Password
Resetting my password as an admin user
Background:
Given I am logged out
And an admin user "[email protected]" exists
Scenario: Resetting password successfully
When I go to the dashboard
And I follow "Forgot your password?"
And I fill in "Email" with "[email protected]"
And I press "Reset My Password"
Then I should see "You will receive an email with instructions on how to reset your password in a few minutes."
@mocks
Scenario: Changing password after resetting
When "[email protected]" requests a password reset with token "foobarbaz"
And I go to the admin password reset form with token "foobarbaz"
And I fill in the password field with "password"
And I fill in "Password confirmation" with "password"
And I press "Change my password"
Then I should see "success"
@mocks
Scenario: Changing password after resetting with errors
When "[email protected]" requests a password reset with token "foobarbaz" but it expires
And I go to the admin password reset form with token "foobarbaz"
And I fill in the password field with "password"
And I fill in "Password confirmation" with "wrong"
And I press "Change my password"
Then I should see "expired"