Cucumber refactoring
This commit is contained in:
parent
21bfd1e7fc
commit
e4447de23f
13 changed files with 163 additions and 119 deletions
|
@ -1,17 +1,9 @@
|
|||
Given /^I visit profile page$/ do
|
||||
visit profile_path
|
||||
end
|
||||
|
||||
Then /^I should see my profile info$/ do
|
||||
page.should have_content "Profile"
|
||||
page.should have_content @user.name
|
||||
page.should have_content @user.email
|
||||
end
|
||||
|
||||
Given /^I visit profile password page$/ do
|
||||
visit profile_password_path
|
||||
end
|
||||
|
||||
Then /^I change my password$/ do
|
||||
fill_in "user_password", :with => "222333"
|
||||
fill_in "user_password_confirmation", :with => "222333"
|
||||
|
@ -22,10 +14,6 @@ Then /^I should be redirected to sign in page$/ do
|
|||
current_path.should == new_user_session_path
|
||||
end
|
||||
|
||||
Given /^I visit profile token page$/ do
|
||||
visit profile_token_path
|
||||
end
|
||||
|
||||
Then /^I reset my token$/ do
|
||||
@old_token = @user.private_token
|
||||
click_button "Reset"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue