Changeset 1971
- Timestamp:
- 08/06/05 08:37:25 (3 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/assertions.rb (modified) (1 diff)
- trunk/actionpack/test/controller/action_pack_assertions_test.rb (modified) (2 diffs)
- trunk/actionpack/test/controller/fake_controllers.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r1970 r1971 1 1 *SVN* 2 3 * Make assert_redirected_to properly check URL's passed as strings #1910 [Scott Barron] 2 4 3 5 * Make sure :layout => false is always used when rendering inside a layout trunk/actionpack/lib/action_controller/assertions.rb
r1858 r1971 79 79 end.flatten 80 80 81 if eurl && url then assert_equal(eurl, url, msg) 82 else assert_equal(epath, path, msg) 83 end 81 assert_equal(eurl, url, msg) if eurl && url 82 assert_equal(epath, path, msg) if epath && path 84 83 else 85 84 msg = build_message(message, "response is not a redirection to all of the options supplied (redirection is <?>)", trunk/actionpack/test/controller/action_pack_assertions_test.rb
r1915 r1971 21 21 22 22 def redirect_to_path() redirect_to '/some/path' end 23 24 def redirect_to_named_route() redirect_to route_one_url end 23 25 24 26 # a redirect to an external location … … 185 187 process :redirect_external 186 188 assert_redirect_url_match /ruby/ 189 end 190 191 # test the redirection to a named route 192 def test_assert_redirect_to_named_route 193 process :redirect_to_named_route 194 assert_raise(Test::Unit::AssertionFailedError) do 195 assert_redirected_to 'http://test.host/route_two' 196 end 187 197 end 188 198 trunk/actionpack/test/controller/fake_controllers.rb
r1837 r1971 20 20 21 21 ActionController::Routing::Routes.draw do |map| 22 map.route_one 'route_one', :controller => 'elsewhere', :action => 'flash_me' 22 23 map.connect ':controller/:action/:id' 23 24 end