mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update test to clearly reflect what it is testing for.
This commit is contained in:
parent
6c5f1692ee
commit
5e11e41420
1 changed files with 7 additions and 5 deletions
|
@ -632,12 +632,14 @@ class RequestProtocol < BaseRequestTest
|
|||
end
|
||||
|
||||
class RequestMethod < BaseRequestTest
|
||||
test "request methods" do
|
||||
[:post, :get, :patch, :put, :delete].each do |method|
|
||||
request = stub_request('REQUEST_METHOD' => method.to_s.upcase)
|
||||
test "method returns environment's request method when it has not been
|
||||
overriden by middleware".squish do
|
||||
|
||||
assert_equal method.to_s.upcase, request.method
|
||||
assert_equal method, request.method_symbol
|
||||
ActionDispatch::Request::HTTP_METHODS.each do |method|
|
||||
request = stub_request('REQUEST_METHOD' => method)
|
||||
|
||||
assert_equal method, request.method
|
||||
assert_equal method.underscore.to_sym, request.method_symbol
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue