diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-09-02 16:45:34 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-09-07 13:15:27 +0300 |
commit | 9836017c709ee5179575647e8d93065eeb854137 (patch) | |
tree | c0be824a4ee5ac2d1571c39fd092366d5acecd36 /features/steps/login_form.rb | |
parent | 81fe6f9d7e813726816b649ce8a27058a74af740 (diff) |
satisfy rubocop
Diffstat (limited to 'features/steps/login_form.rb')
-rw-r--r-- | features/steps/login_form.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/features/steps/login_form.rb b/features/steps/login_form.rb new file mode 100644 index 00000000000..b9ff6ae67fd --- /dev/null +++ b/features/steps/login_form.rb @@ -0,0 +1,25 @@ +class Spinach::Features::LoginForm < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedSnippet + include SharedUser + include SharedSearch + + 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) + 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 + visit new_user_session_path + end +end |