debian-mirror-gitlab/spec/support/helpers/test_request_helpers.rb

12 lines
312 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# 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