504cbb27c1
Remove the inheritance from ::BaseService which is causing us to inherit the initializer that has project as the first arg, as we will not have access to project with forthcoming group clusters. Also call install service from create service - 1 less thing to re-use Extract TestRequest code into a spec helper. Given that we need different behaviour for Rails 5.0 (and again in Rails 5.1!), it's handy to have that branching behaviour in one place
11 lines
312 B
Ruby
11 lines
312 B
Ruby
# frozen_string_literal: true
|
|
|
|
module TestRequestHelpers
|
|
def test_request(remote_ip: '127.0.0.1')
|
|
if Gitlab.rails5?
|
|
ActionController::TestRequest.new({ remote_ip: remote_ip }, ActionController::TestSession.new)
|
|
else
|
|
ActionController::TestRequest.new(remote_ip: remote_ip)
|
|
end
|
|
end
|
|
end
|