From 0f5ba6e124b583fa0c92fc6e82fff124673d8e0d Mon Sep 17 00:00:00 2001 From: Alexey Chernenkov Date: Thu, 30 May 2013 20:05:13 +0600 Subject: Fix `assert_redirected_to` does not show user-supplied message. Issue: when `assert_redirected_to` fails due to the response redirect not matching the expected redirect the user-supplied message (second parameter) is not shown. This message is only shown if the response is not a redirect. --- actionpack/test/dispatch/routing_assertions_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/test') diff --git a/actionpack/test/dispatch/routing_assertions_test.rb b/actionpack/test/dispatch/routing_assertions_test.rb index 9f95d82129..423eeda92c 100644 --- a/actionpack/test/dispatch/routing_assertions_test.rb +++ b/actionpack/test/dispatch/routing_assertions_test.rb @@ -42,7 +42,7 @@ class RoutingAssertionsTest < ActionController::TestCase def test_assert_recognizes_with_extras assert_recognizes({ :controller => 'articles', :action => 'index', :page => '1' }, '/articles', { :page => '1' }) end - + def test_assert_recognizes_with_method assert_recognizes({ :controller => 'articles', :action => 'create' }, { :path => '/articles', :method => :post }) assert_recognizes({ :controller => 'articles', :action => 'update', :id => '1' }, { :path => '/articles/1', :method => :put }) -- cgit v1.2.3