gitlab-org--gitlab-foss/spec/support/helpers/test_request_helpers.rb
Jasper Maes 624a1cdab4 Upgrade Rails to 5.1.6.1
Model.new.attributes now also returns encrypted attributes.
2019-04-23 08:31:23 +08:00

7 lines
238 B
Ruby

# frozen_string_literal: true
module TestRequestHelpers
def test_request(remote_ip: '127.0.0.1', controller: nil)
ActionController::TestRequest.new({ remote_ip: remote_ip }, ActionController::TestSession.new, controller)
end
end