diff options
author | Arthur Nogueira Neves <github@arthurnn.com> | 2016-09-22 13:30:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-22 13:30:13 -0400 |
commit | f08bb28702a2df5d2f9e3a354aa63cf7e738dc58 (patch) | |
tree | f683a841ed59cd18d1e4059d5697af642a6bbc64 /actionpack/test | |
parent | bf19c2230d20f7679b1fb52505c49c183627b235 (diff) | |
parent | 7e350c67057affccde176eeeffcffbe10806feda (diff) | |
download | rails-f08bb28702a2df5d2f9e3a354aa63cf7e738dc58.tar.gz rails-f08bb28702a2df5d2f9e3a354aa63cf7e738dc58.tar.bz2 rails-f08bb28702a2df5d2f9e3a354aa63cf7e738dc58.zip |
Merge pull request #26589 from kirs/ad-test-request-method
Fix memoization bug on ActionDispatch::TestRequest#request_method=
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/test_request_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/test_request_test.rb b/actionpack/test/dispatch/test_request_test.rb index 35af3076ba..b479af781d 100644 --- a/actionpack/test/dispatch/test_request_test.rb +++ b/actionpack/test/dispatch/test_request_test.rb @@ -88,6 +88,13 @@ class TestRequestTest < ActiveSupport::TestCase assert_equal "GoogleBot", req.user_agent end + test "request_method getter and setter" do + req = ActionDispatch::TestRequest.create + req.request_method # to reproduce bug caused by memoization + req.request_method = "POST" + assert_equal "POST", req.request_method + end + test "setter methods" do req = ActionDispatch::TestRequest.create({}) get = "GET" |