File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed
Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -158,3 +158,14 @@ def sign_up user
158158Then /^I see a successfull sign in message$/ do
159159 page . should have_content "Signed in successfully."
160160end
161+
162+ When /^I edit my account details$/ do
163+ click_link "Edit account"
164+ fill_in "Name" , :with => "newname"
165+ fill_in "Current password" , :with => valid_user [ :password ]
166+ click_button "Update"
167+ end
168+
169+ Then /^I should see an account edited message$/ do
170+ page . should have_content "You updated your account successfully."
171+ end
Original file line number Diff line number Diff line change @@ -4,12 +4,6 @@ Feature: Edit User
44 so I can change my username
55
66 Scenario : I sign in and edit my account
7- Given I am a user named "foo" with an email "user@test.com" and password "please"
8- When I sign in as "user@test.com/please"
9- Then I should be signed in
10- When I follow "Edit account"
11- And I fill in "Name" with "baz"
12- And I fill in "Current password" with "please"
13- And I press "Update"
14- And I go to the homepage
15- Then I should see "User: baz"
7+ Given I am logged in
8+ When I edit my account details
9+ Then I should see an account edited message
You can’t perform that action at this time.
0 commit comments