summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--features/crowd_login_form.feature5
-rw-r--r--features/steps/crowd_login_form.rb21
2 files changed, 26 insertions, 0 deletions
diff --git a/features/crowd_login_form.feature b/features/crowd_login_form.feature
new file mode 100644
index 00000000000..d5a347b5fd5
--- /dev/null
+++ b/features/crowd_login_form.feature
@@ -0,0 +1,5 @@
+Feature: Crowd login form
+ Scenario: I see crowd form
+ Given Crowd integration enabled
+ When I visit sign in page
+ Then I should see Crowd login form \ No newline at end of file
diff --git a/features/steps/crowd_login_form.rb b/features/steps/crowd_login_form.rb
new file mode 100644
index 00000000000..31bc6eea3c9
--- /dev/null
+++ b/features/steps/crowd_login_form.rb
@@ -0,0 +1,21 @@
+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 \ No newline at end of file