mirror of https://github.com/rails/rails
Fix warning on arg forwarding in integration tests
Kwargs need to be forwarded for this method_missing to avoid warnings in Ruby 2.7.
This commit is contained in:
parent
4628518382
commit
e4c035a8fb
|
@ -432,6 +432,7 @@ module ActionDispatch
|
|||
super
|
||||
end
|
||||
end
|
||||
ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -170,9 +170,10 @@ end
|
|||
class IntegrationTestUsesCorrectClass < ActionDispatch::IntegrationTest
|
||||
def test_integration_methods_called
|
||||
reset!
|
||||
headers = { "Origin" => "*" }
|
||||
|
||||
%w( get post head patch put delete ).each do |verb|
|
||||
assert_nothing_raised { __send__(verb, "/") }
|
||||
%w( get post head patch put delete options ).each do |verb|
|
||||
assert_nothing_raised { __send__(verb, "/", headers: headers) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue