diff options
author | Go MAEDA <maeda@farend.jp> | 2024-06-12 16:09:37 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-06-12 16:09:37 +0000 |
commit | b803bddb1f32842b0a5ec93640778d902b5f7999 (patch) | |
tree | fb1dba7c75c0dc0111516d2d4384b89ecefb5e1a /test/integration/application_test.rb | |
parent | e41bc39322cae528d1c24256f6f404f5937d78ab (diff) | |
download | redmine-b803bddb1f32842b0a5ec93640778d902b5f7999.tar.gz redmine-b803bddb1f32842b0a5ec93640778d902b5f7999.zip |
Fix "ArgumentError: Invalid response name: unprocessable_entity" with Rack 3.1.0+ in assert_response (#39889).
Rack 3.1.0 changed the symbol for HTTP status code 422 from `:unprocessable_entity` to `:unprocessable_content`.
Due to the change, `assert_response(:unprocessable_entity, ...)` raises ArgumentError with Rack 3.1.0+.
This fix is a follow-up to r22837.
git-svn-id: https://svn.redmine.org/redmine/trunk@22876 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/application_test.rb')
-rw-r--r-- | test/integration/application_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/application_test.rb b/test/integration/application_test.rb index 7f077b571..77c96d89b 100644 --- a/test/integration/application_test.rb +++ b/test/integration/application_test.rb @@ -73,7 +73,7 @@ class ApplicationTest < Redmine::IntegrationTest def test_invalid_token_should_call_custom_handler ActionController::Base.allow_forgery_protection = true post '/issues' - assert_response :unprocessable_entity + assert_response :unprocessable_content assert_include "Invalid form authenticity token.", response.body ensure ActionController::Base.allow_forgery_protection = false @@ -83,7 +83,7 @@ class ApplicationTest < Redmine::IntegrationTest ActionController::Base.allow_forgery_protection = true Setting.default_language = 'en' post '/issues', :headers => {'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3'} - assert_response :unprocessable_entity + assert_response :unprocessable_content assert_equal :fr, current_language assert_select "html[lang=?]", "fr" ensure |