summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorIzaak Alpert <ialpert@blackberry.com>2013-09-17 16:37:36 -0400
committerIzaak Alpert <ialpert@blackberry.com>2013-09-17 22:38:08 -0400
commitca1b67ce38eb43edc969c0ca04264b7ea423413c (patch)
treead5696dc23d8a600719f7a388518aca12d76adda /features
parent16b6040c2e810253b29bfed4df5fcd098c456813 (diff)
downloadgitlab-ce-ca1b67ce38eb43edc969c0ca04264b7ea423413c.tar.gz
Don't show users password change page if ldap users
Diffstat (limited to 'features')
-rw-r--r--features/profile/profile.feature1
-rw-r--r--features/steps/profile/profile.rb5
2 files changed, 6 insertions, 0 deletions
diff --git a/features/profile/profile.feature b/features/profile/profile.feature
index 53a93b0f908..3b61552a73d 100644
--- a/features/profile/profile.feature
+++ b/features/profile/profile.feature
@@ -18,6 +18,7 @@ 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
Then I redirected to expired password page
And I submit new password
diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb
index 23eeac447b0..6944977c3ff 100644
--- a/features/steps/profile/profile.rb
+++ b/features/steps/profile/profile.rb
@@ -91,6 +91,11 @@ class Profile < Spinach::FeatureSteps
current_user.update_attributes(password_expires_at: Time.now - 1.hour)
end
+ step "I am not an ldap user" do
+ current_user.update_attributes(extern_uid: nil, provider: '')
+ current_user.ldap_user?.should be_false
+ end
+
step 'I redirected to expired password page' do
current_path.should == new_profile_password_path
end