Skip to content

Commit d3a966b

Browse files
author
Rhys Powell
committed
Made the users feature pass
1 parent 918767c commit d3a966b

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

features/step_definitions/user_steps.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,19 @@
1717
page.should have_selector('title', :content => "#{@user.username}'s page")
1818
page.should have_content("About #{@user.username}")
1919
end
20+
21+
When /^I edit my profile$/ do
22+
visit('/users/edit')
23+
fill_in("About", with: "Test user likes to edit his profile|")
24+
fill_in("Current password", with: @user.password)
25+
click_button "Update"
26+
end
27+
28+
Then /^I should be notified that my profile was updated$/ do
29+
page.should have_content("updated your account")
30+
end
31+
32+
Then /^I should see my changes reflected on my profile page$/ do
33+
visit("/users/#{@user.username}")
34+
page.should have_content("Test user likes to edit his profile")
35+
end

features/users.feature

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ Feature: Manage account
1010
Then it should have the right information
1111

1212
Scenario: Edit my profile
13-
When I go to change my settings
14-
And fill in the following
15-
| About | New users love editing their page |
16-
| Current password | foobar |
17-
And submit the form
13+
When I edit my profile
1814
Then I should be notified that my profile was updated
19-
When I look at my page
20-
Then I should see my changes reflected
15+
And I should see my changes reflected on my profile page

0 commit comments

Comments
 (0)