satisfy rubocop
This commit is contained in:
parent
81fe6f9d7e
commit
9836017c70
|
@ -1,4 +1,4 @@
|
||||||
Feature: Crowd login form
|
Feature: Login form
|
||||||
Scenario: I see crowd form
|
Scenario: I see crowd form
|
||||||
Given Crowd integration enabled
|
Given Crowd integration enabled
|
||||||
When I visit sign in page
|
When I visit sign in page
|
|
@ -1,21 +0,0 @@
|
||||||
class Spinach::Features::CrowdLoginForm < Spinach::FeatureSteps
|
|
||||||
include SharedAuthentication
|
|
||||||
include SharedPaths
|
|
||||||
include SharedSnippet
|
|
||||||
include SharedUser
|
|
||||||
include SharedSearch
|
|
||||||
|
|
||||||
step 'Crowd integration enabled' do
|
|
||||||
Gitlab::OAuth::Provider.should_receive(:providers).and_return([:crowd])
|
|
||||||
allow_any_instance_of(ApplicationHelper).to receive(:user_omniauth_authorize_path).and_return(root_path)
|
|
||||||
Gitlab.config.omniauth.should_receive(:enabled).and_return(true)
|
|
||||||
end
|
|
||||||
|
|
||||||
step 'I should see Crowd login form' do
|
|
||||||
expect(page).to have_selector '#tab-crowd form'
|
|
||||||
end
|
|
||||||
|
|
||||||
step 'I visit sign in page' do
|
|
||||||
visit new_user_session_path
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -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
|
Loading…
Reference in New Issue