summaryrefslogtreecommitdiff
path: root/features/steps/login_form.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-02-08 11:20:11 +0100
committerRémy Coutable <remy@rymai.me>2016-02-23 15:13:50 +0100
commiteb178f6d66b65035ce5795cac517d3389a187acc (patch)
treebd1d46fba5cc407a7310665309c30a326fa23321 /features/steps/login_form.rb
parentdcaeee45790480210cf241d5dfead86803fa16a7 (diff)
downloadgitlab-ce-hudecof/show-crowd-login-form-when-signin-disabled.tar.gz
Add a spec to ensure Crowd login form is shown even when sign-in is disabledhudecof/show-crowd-login-form-when-signin-disabled
Diffstat (limited to 'features/steps/login_form.rb')
-rw-r--r--features/steps/login_form.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/features/steps/login_form.rb b/features/steps/login_form.rb
index b9ff6ae67fd..90ab10e6229 100644
--- a/features/steps/login_form.rb
+++ b/features/steps/login_form.rb
@@ -5,18 +5,18 @@ class Spinach::Features::LoginForm < Spinach::FeatureSteps
include SharedUser
include SharedSearch
+ step 'Sign-in is disabled' do
+ allow_any_instance_of(ApplicationHelper).to receive(:signin_enabled?).and_return(false)
+ end
+
step 'Crowd integration enabled' do
- @providers_orig = Gitlab::OAuth::Provider.providers
- @omniauth_conf_orig = Gitlab.config.omniauth.enabled
expect(Gitlab::OAuth::Provider).to receive(:providers).and_return([:crowd])
- allow_any_instance_of(ApplicationHelper).to receive(:user_omniauth_authorize_path).and_return(root_path)
expect(Gitlab.config.omniauth).to receive(:enabled).and_return(true)
+ allow_any_instance_of(ApplicationHelper).to receive(:user_omniauth_authorize_path).and_return(root_path)
end
step 'I should see Crowd login form' do
expect(page).to have_selector '#tab-crowd form'
- Gitlab::OAuth::Provider.stub(:providers).and_return(@providers_orig)
- Gitlab.config.omniauth.stub(:enabled).and_return(@omniauth_conf_orig)
end
step 'I visit sign in page' do