Skip to content

Commit eed1cb2

Browse files
committed
Fix tests for status code change on Rack HEAD
Rack was recently [updated][1] with a deprecation for some status codes that have been renamed (most notably, Unprocessable Entity was renamed to Unprocessable Content). Since the deprecation was only added to the `#status_code` method, this has caused test failures for some tests that depend on the `SYMBOLS_TO_STATUS_CODE` hash. This commit replaces the usage of `SYMBOLS_TO_STATUS_CODE` with `#status_code` so that we get the deprecation message instead of a test failure. [1]: rack/rack@64ad26e
1 parent c80fa6a commit eed1cb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actionpack/lib/action_dispatch/testing/assertion_response.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def code_and_name
3636

3737
private
3838
def code_from_name(name)
39-
GENERIC_RESPONSE_CODES[name] || Rack::Utils::SYMBOL_TO_STATUS_CODE[name]
39+
GENERIC_RESPONSE_CODES[name] || Rack::Utils.status_code(name)
4040
end
4141

4242
def name_from_code(code)

0 commit comments

Comments
 (0)