Skip to content

Commit e7a1740

Browse files
authored
Keep assert_redirected_to backwards compatible
1 parent 28eb8b4 commit e7a1740

File tree

1 file changed

+1
-1
lines changed
  • actionpack/lib/action_dispatch/testing/assertions

1 file changed

+1
-1
lines changed

actionpack/lib/action_dispatch/testing/assertions/response.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def assert_response(type, message = nil)
5555
# # Permanently).
5656
# assert_redirected_to "/some/path", status: :moved_permanently
5757
def assert_redirected_to(url_options = {}, options = {}, message = nil)
58-
options, message = message, nil if message.is_a?(Hash) && options.empty?
58+
options, message = {}, options unless options.is_a?(Hash)
5959

6060
status = options[:status] || :redirect
6161
assert_response(status, message)

0 commit comments

Comments
 (0)