summaryrefslogtreecommitdiff
path: root/spec/support/login_helpers.rb
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2017-07-03 19:37:37 +0000
committerTimothy Andrew <mail@timothyandrew.net>2017-07-06 06:30:07 +0000
commit7c2f5bb48d98426b8458782216311f24aa705209 (patch)
tree42ddeb5c86f5d4e99152b81fe5425e4629d0a8e9 /spec/support/login_helpers.rb
parentf1caa0b316c0be7c957e34a4bcc9f392023379d3 (diff)
downloadgitlab-ce-7c2f5bb48d98426b8458782216311f24aa705209.tar.gz
Fix build for !11963.
- Don't use `request.env['omniauth.params']` if it isn't present. - Remove the `saml` section from the `gitlab.yml` test section. Some tests depend on this section not being initially present, so it can be overridden in the test. This MR doesn't add any tests for SAML, so we didn't really need this in the first place anyway. - Clean up the test -> omniauth section of `gitlab.yml`
Diffstat (limited to 'spec/support/login_helpers.rb')
-rw-r--r--spec/support/login_helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/login_helpers.rb b/spec/support/login_helpers.rb
index 184c7b5125a..99e7806353d 100644
--- a/spec/support/login_helpers.rb
+++ b/spec/support/login_helpers.rb
@@ -118,6 +118,7 @@ module LoginHelpers
end
allow(Gitlab::OAuth::Provider).to receive_messages(providers: [:saml], config_for: mock_saml_config)
stub_omniauth_setting(messages)
- expect_any_instance_of(Object).to receive(:omniauth_authorize_path).with(:user, "saml").and_return('/users/auth/saml')
+ allow_any_instance_of(Object).to receive(:user_saml_omniauth_authorize_path).and_return('/users/auth/saml')
+ allow_any_instance_of(Object).to receive(:omniauth_authorize_path).with(:user, "saml").and_return('/users/auth/saml')
end
end