Make the stubbed methods for SAML authorize paths more specific
Globally stubbing any instance of `Object` seems like a very bad idea, and it led to test failures here: - https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/76025159 - https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/76024972
This commit is contained in:
parent
e0da61bca8
commit
73ade323c8
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue