From ee45d76df80a86961dd44f8526b0ac97bc98ce60 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 22 Sep 2007 23:10:41 +0000 Subject: Roll back #7578, tests failed git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7580 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/action_controller/assertions/response_assertions.rb | 5 +++-- actionpack/test/template/url_helper_test.rb | 10 ---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/actionpack/lib/action_controller/assertions/response_assertions.rb b/actionpack/lib/action_controller/assertions/response_assertions.rb index a2831aff67..f45727f508 100644 --- a/actionpack/lib/action_controller/assertions/response_assertions.rb +++ b/actionpack/lib/action_controller/assertions/response_assertions.rb @@ -78,8 +78,9 @@ module ActionController url[key] = value end - @response_diff = url[:actual].diff(url[:expected]) if url[:actual] - msg = build_message(message, "expected a redirect to , found one to , a difference of ", url[:expected], url[:actual], @response_diff) + @response_diff = url[:expected].diff(url[:actual]) if url[:actual] + msg = build_message(message, "response is not a redirection to all of the options supplied (redirection is ), difference: ", + url[:actual], @response_diff) assert_block(msg) do url[:expected].keys.all? do |k| diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index 712b827c5c..db1e226a7e 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -108,16 +108,6 @@ class UrlHelperTest < Test::Unit::TestCase def test_link_tag_with_query_and_no_name assert_dom_equal "http://www.example.com?q1=v1&q2=v2", link_to(nil, "http://www.example.com?q1=v1&q2=v2") end - - def test_link_tag_with_back - @controller.request = RequestMock.new("http://www.example.com/weblog/show", nil, nil, {'HTTP_REFERER' => 'http://www.example.com/referer'}) - assert_dom_equal "go back", link_to('go back', :back) - end - - def test_link_tag_with_back_and_no_referer - @controller.request = RequestMock.new("http://www.example.com/weblog/show", nil, nil, {}) - assert_dom_equal "go back", link_to('go back', :back) - end def test_link_tag_with_img assert_dom_equal "", link_to("", "http://www.example.com") -- cgit v1.2.3