From 321f8cecdc8044625a8951cbcdd94c6c1c8f83f5 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 5 Aug 2013 19:09:50 +0100 Subject: [PATCH] RoutingError is now UrlGenerationError --- test/functional/browse_controller_test.rb | 4 ++-- test/functional/changeset_controller_test.rb | 6 +++--- test/functional/message_controller_test.rb | 8 ++++---- test/functional/old_node_controller_test.rb | 2 +- test/functional/user_blocks_controller_test.rb | 12 ++++++------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/test/functional/browse_controller_test.rb b/test/functional/browse_controller_test.rb index 87a3e7489..b320be1e3 100644 --- a/test/functional/browse_controller_test.rb +++ b/test/functional/browse_controller_test.rb @@ -131,10 +131,10 @@ class BrowseControllerTest < ActionController::TestCase # then we check that we get the correct 404 when a non-existant id is passed # then we check that it will get a successful response, when we do pass an id def browse_check(type, id) - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do get type end - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do get type, {:id => -10} # we won't have an id that's negative end get type, {:id => id} diff --git a/test/functional/changeset_controller_test.rb b/test/functional/changeset_controller_test.rb index aace6e70d..05f2ff569 100644 --- a/test/functional/changeset_controller_test.rb +++ b/test/functional/changeset_controller_test.rb @@ -175,7 +175,7 @@ class ChangesetControllerTest < ActionController::TestCase begin get :read, :id => id assert_response :not_found, "should get a not found" - rescue ActionController::RoutingError => ex + rescue ActionController::UrlGenerationError => ex assert_match /No route matches/, ex.to_s end end @@ -241,7 +241,7 @@ class ChangesetControllerTest < ActionController::TestCase begin put :close, :id => id assert_response :unauthorized, "Shouldn't be able close the non-existant changeset #{id}, when not authorized" - rescue ActionController::RoutingError => ex + rescue ActionController::UrlGenerationError => ex assert_match /No route matches/, ex.to_s end end @@ -252,7 +252,7 @@ class ChangesetControllerTest < ActionController::TestCase begin put :close, :id => id assert_response :not_found, "The changeset #{id} doesn't exist, so can't be closed" - rescue ActionController::RoutingError => ex + rescue ActionController::UrlGenerationError => ex assert_match /No route matches/, ex.to_s end end diff --git a/test/functional/message_controller_test.rb b/test/functional/message_controller_test.rb index d6b5671ac..f015b1ec3 100644 --- a/test/functional/message_controller_test.rb +++ b/test/functional/message_controller_test.rb @@ -130,7 +130,7 @@ class MessageControllerTest < ActionController::TestCase assert_equal true, Message.find(messages(:unread_message).id).message_read # Asking to reply to a message with no ID should fail - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do get :reply end @@ -177,7 +177,7 @@ class MessageControllerTest < ActionController::TestCase assert_equal true, Message.find(messages(:unread_message).id).message_read # Asking to read a message with no ID should fail - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do get :read end @@ -280,7 +280,7 @@ class MessageControllerTest < ActionController::TestCase assert_equal false, Message.find(messages(:unread_message).id).message_read # Asking to mark a message with no ID should fail - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do post :mark end @@ -327,7 +327,7 @@ class MessageControllerTest < ActionController::TestCase assert_equal true, m.to_user_visible # Asking to delete a message with no ID should fail - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do post :delete end diff --git a/test/functional/old_node_controller_test.rb b/test/functional/old_node_controller_test.rb index 44edc06a2..ac318f84b 100644 --- a/test/functional/old_node_controller_test.rb +++ b/test/functional/old_node_controller_test.rb @@ -156,7 +156,7 @@ class OldNodeControllerTest < ActionController::TestCase def check_not_found_id_version(id, version) get :version, :id => id, :version => version assert_response :not_found - rescue ActionController::RoutingError => ex + rescue ActionController::UrlGenerationError => ex assert_match /No route matches/, ex.to_s end diff --git a/test/functional/user_blocks_controller_test.rb b/test/functional/user_blocks_controller_test.rb index 297245929..39ebfd28e 100644 --- a/test/functional/user_blocks_controller_test.rb +++ b/test/functional/user_blocks_controller_test.rb @@ -76,7 +76,7 @@ class UserBlocksControllerTest < ActionController::TestCase # test the show action def test_show # Viewing a block should fail when no ID is given - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do get :show end @@ -184,7 +184,7 @@ class UserBlocksControllerTest < ActionController::TestCase end # We should get an error if no user is specified - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do get :edit end @@ -311,7 +311,7 @@ class UserBlocksControllerTest < ActionController::TestCase assert_equal "Vandalism", b.reason # We should get an error if no block ID is specified - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do put :update end @@ -358,7 +358,7 @@ class UserBlocksControllerTest < ActionController::TestCase assert_in_delta Time.now, b.ends_at, 1 # We should get an error if no block ID is specified - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do get :revoke end @@ -373,7 +373,7 @@ class UserBlocksControllerTest < ActionController::TestCase # test the blocks_on action def test_blocks_on # Asking for a list of blocks with no user name should fail - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do get :blocks_on end @@ -411,7 +411,7 @@ class UserBlocksControllerTest < ActionController::TestCase # test the blocks_by action def test_blocks_by # Asking for a list of blocks with no user name should fail - assert_raise ActionController::RoutingError do + assert_raise ActionController::UrlGenerationError do get :blocks_by end -- 2.43.2