Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-10-09 18:01:04 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-10-09 18:01:04 +0400
commite50c0d5cb7bcdc1131dae8cd5d5de2947732cda8 (patch)
tree94fd233b793f7163bf395ec012d0f0745e8538d6 /features
parentffec158de4c6a78dfa17ae0063d8f796c21a58c8 (diff)
Fix spinach profile tests
Diffstat (limited to 'features')
-rw-r--r--features/profile/profile.feature10
-rw-r--r--features/steps/profile/profile.rb6
-rw-r--r--features/steps/shared/paths.rb6
3 files changed, 15 insertions, 7 deletions
diff --git a/features/profile/profile.feature b/features/profile/profile.feature
index 6d210fb4df7..6198fd2b306 100644
--- a/features/profile/profile.feature
+++ b/features/profile/profile.feature
@@ -12,13 +12,13 @@ Feature: Profile
And I should see new contact info
Scenario: I change my password without old one
- Given I visit profile account page
+ Given I visit profile password page
When I try change my password w/o old one
Then I should see a missing password error message
- And I should be redirected to account page
+ And I should be redirected to password page
Scenario: I change my password
- Given I visit profile account page
+ Given I visit profile password page
Then I change my password
And I should be redirected to sign in page
@@ -30,13 +30,13 @@ Feature: Profile
Scenario: My password is expired
Given my password is expired
And I am not an ldap user
- And I visit profile account page
+ Given I visit profile password page
Then I redirected to expired password page
And I submit new password
And I redirected to sign in page
Scenario: I unsuccessfully change my password
- Given I visit profile account page
+ Given I visit profile password page
When I unsuccessfully change my password
Then I should see a password error message
diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb
index ea7550a6f22..753e2c19bcb 100644
--- a/features/steps/profile/profile.rb
+++ b/features/steps/profile/profile.rb
@@ -133,8 +133,12 @@ class Profile < Spinach::FeatureSteps
current_path.should == new_user_session_path
end
+ step 'I should be redirected to password page' do
+ current_path.should == edit_profile_password_path
+ end
+
step 'I should be redirected to account page' do
- current_path.should == account_profile_path
+ current_path.should == profile_account_path
end
step 'I click on my profile picture' do
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index c30eccce1c5..156fa5bab4e 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -65,8 +65,12 @@ module SharedPaths
visit profile_path
end
+ step 'I visit profile password page' do
+ visit edit_profile_password_path
+ end
+
step 'I visit profile account page' do
- visit account_profile_path
+ visit profile_account_path
end
step 'I visit profile SSH keys page' do