diff options
author | Maxime Besson <maxime.besson@smile.fr> | 2017-03-23 16:49:59 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-02 21:00:11 +0300 |
commit | 9326d896238dd82bf5b8b1a3bc7913b8f03b5c98 (patch) | |
tree | c47c4711e1944ebe5f0477e004dd8d8c5c8103b9 /spec/support | |
parent | 1e8dbd46758d5c9772baf233ebcff889dc742d3d (diff) |
Allow manual bypass of auto_sign_in_with_provider
This commit lets a user bypass the automatic signin on the login form,
in order to login with a technical (admin, etc) account
Closes #3786
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/import_spec_helper.rb | 2 | ||||
-rw-r--r-- | spec/support/stub_configuration.rb | 4 |
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 |