Backport stub_default_url_options from EE
Used in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5782
This commit is contained in:
parent
8cd5004b35
commit
d4f2978734
1 changed files with 5 additions and 0 deletions
|
@ -27,6 +27,11 @@ module StubConfiguration
|
|||
allow(Gitlab.config.gitlab).to receive_messages(to_settings(messages))
|
||||
end
|
||||
|
||||
def stub_default_url_options(host: "localhost", protocol: "http")
|
||||
url_options = { host: host, protocol: protocol }
|
||||
allow(Rails.application.routes).to receive(:default_url_options).and_return(url_options)
|
||||
end
|
||||
|
||||
def stub_gravatar_setting(messages)
|
||||
allow(Gitlab.config.gravatar).to receive_messages(to_settings(messages))
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue