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:
authorDouwe Maan <douwe@gitlab.com>2017-06-03 00:37:17 +0300
committerDouwe Maan <douwe@gitlab.com>2017-06-03 00:37:17 +0300
commit8f7fc44b63f728d4de9c2e57a1452c53fa02a642 (patch)
tree8cc38fcb34c604e209e248e6d2c302374a4f7d9e /spec/support
parent3c63ac4c9ecc71d78239a1a6c53b1c49d4092ea4 (diff)
parent9326d896238dd82bf5b8b1a3bc7913b8f03b5c98 (diff)
Merge branch 'mabes/gitlab-ce-bypass-auto-login' into 'master'
Allow manual bypass of auto_sign_in_with_provider Closes #3786 See merge request !11884
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/import_spec_helper.rb2
-rw-r--r--spec/support/stub_configuration.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/spec/support/import_spec_helper.rb b/spec/support/import_spec_helper.rb
index 6710962f082..d4eced724fa 100644
--- a/spec/support/import_spec_helper.rb
+++ b/spec/support/import_spec_helper.rb
@@ -28,6 +28,6 @@ module ImportSpecHelper
app_id: 'asd123',
app_secret: 'asd123'
)
- allow(Gitlab.config.omniauth).to receive(:providers).and_return([provider])
+ stub_omniauth_setting(providers: [provider])
end
end
diff --git a/spec/support/stub_configuration.rb b/spec/support/stub_configuration.rb
index 444adcc1906..b39a23bd18a 100644
--- a/spec/support/stub_configuration.rb
+++ b/spec/support/stub_configuration.rb
@@ -25,6 +25,10 @@ module StubConfiguration
allow(Gitlab.config.mattermost).to receive_messages(messages)
end
+ def stub_omniauth_setting(messages)
+ allow(Gitlab.config.omniauth).to receive_messages(messages)
+ end
+
private
# Modifies stubbed messages to also stub possible predicate versions