Browse files

Forced user edit details into step definitons

  • Loading branch information...
thecatwasnot committed Dec 12, 2011
1 parent 512346a commit 10ea33af05da238e41c224151d728b30a7d89adc
Showing with 14 additions and 9 deletions.
  1. +11 −0 features/step_definitions/user_steps.rb
  2. +3 −9 features/users/user_edit.feature
@@ -158,3 +158,14 @@ def sign_up user
Then /^I see a successfull sign in message$/ do
page.should have_content "Signed in successfully."
+When /^I edit my account details$/ do
+ click_link "Edit account"
+ fill_in "Name", :with => "newname"
+ fill_in "Current password", :with => valid_user[:password]
+ click_button "Update"
+Then /^I should see an account edited message$/ do
+ page.should have_content "You updated your account successfully."
@@ -4,12 +4,6 @@ Feature: Edit User
so I can change my username
Scenario: I sign in and edit my account
- Given I am a user named "foo" with an email "" and password "please"
- When I sign in as ""
- Then I should be signed in
- When I follow "Edit account"
- And I fill in "Name" with "baz"
- And I fill in "Current password" with "please"
- And I press "Update"
- And I go to the homepage
- Then I should see "User: baz"
+ Given I am logged in
+ When I edit my account details
+ Then I should see an account edited message

0 comments on commit 10ea33a

Please sign in to comment.