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:
Diffstat (limited to 'spec/support/helpers/login_helpers.rb')
-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)