diff options
author | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-07-08 23:42:40 +0800 |
---|---|---|
committer | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-07-18 14:50:49 +0800 |
commit | 095a54502e58eac2b796500fc73c5c2afba91b04 (patch) | |
tree | d77392d4f26b4cafeb857e36d279450360ef249d /actionpack | |
parent | 5e11e414208608b7e43372154493b3e0a184e580 (diff) | |
download | rails-095a54502e58eac2b796500fc73c5c2afba91b04.tar.gz rails-095a54502e58eac2b796500fc73c5c2afba91b04.tar.bz2 rails-095a54502e58eac2b796500fc73c5c2afba91b04.zip |
Fix duplicated test.
There is already another test covering Request#request_method. This
test should cover Request#method.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 62fc86f6a0..db52bca441 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -654,9 +654,13 @@ class RequestMethod < BaseRequestTest assert_equal 'POST', request.method end - test "invalid method hacking on post raises exception" do + test "method raises exception on invalid HTTP method" do assert_raise(ActionController::UnknownHttpMethod) do - stub_request('REQUEST_METHOD' => '_RANDOM_METHOD').request_method + stub_request('rack.methodoverride.original_method' => '_RANDOM_METHOD').method + end + + assert_raise(ActionController::UnknownHttpMethod) do + stub_request('REQUEST_METHOD' => '_RANDOM_METHOD').method end end |