Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-09-02 16:17:30 +0300
committerValery Sizov <vsv2711@gmail.com>2015-09-02 16:17:30 +0300
commit81fe6f9d7e813726816b649ce8a27058a74af740 (patch)
tree3dcd08ebe34f5640621bc1b30650b521ad5baae8 /features
parent3700e5a9607ba9980940a29d275e22034538473d (diff)
added spinach
Diffstat (limited to 'features')
-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