summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-06-20 16:41:35 +0000
committerRémy Coutable <remy@rymai.me>2018-06-20 16:41:35 +0000
commitca530a9ba34a86ff10899ed4ea06d6ebc9cb3dc2 (patch)
treed77b27ee72516c17c38fbc86b41584e93021386b
parent3147efef09b9e86219d9bb3e4fdbd549543cf967 (diff)
parent73ade323c8993451199a965ec2330d9c7334c2e2 (diff)
downloadgitlab-ce-ca530a9ba34a86ff10899ed4ea06d6ebc9cb3dc2.tar.gz
Merge branch 'rs-platform-feature-spec-parity' into 'master'
Make the stubbed methods for SAML authorize paths more specific See merge request gitlab-org/gitlab-ce!20009
-rw-r--r--spec/support/helpers/login_helpers.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/support/helpers/login_helpers.rb b/spec/support/helpers/login_helpers.rb
index f7b71bf42e3..329f18cd288 100644
--- a/spec/support/helpers/login_helpers.rb
+++ b/spec/support/helpers/login_helpers.rb
@@ -152,8 +152,13 @@ module LoginHelpers
end
def stub_saml_authorize_path_helpers
- 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')
+ allow_any_instance_of(ActionDispatch::Routing::RoutesProxy)
+ .to receive(:user_saml_omniauth_authorize_path)
+ .and_return('/users/auth/saml')
+ allow(Devise::OmniAuth::UrlHelpers)
+ .to receive(:omniauth_authorize_path)
+ .with(:user, "saml")
+ .and_return('/users/auth/saml')
end
def stub_omniauth_config(messages)