RoutingError is now UrlGenerationError
This commit is contained in:
parent
6c51b3cc0a
commit
321f8cecdc
5 changed files with 16 additions and 16 deletions
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue