X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ed699548e64fc96289b6b04ccd5303692baafffa..b0fa1cf936fffb2251bd47db57663ba5e03a23b8:/test/functional/changeset_controller_test.rb diff --git a/test/functional/changeset_controller_test.rb b/test/functional/changeset_controller_test.rb index 9ed9f2959..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 @@ -1728,7 +1728,7 @@ EOF ## # This should display the last 20 changesets closed. def test_list - changesets = Changeset.find(:all, :order => "created_at DESC", :conditions => ['num_changes > 0'], :limit=> 20) + changesets = Changeset.where("num_changes > 0").order(:created_at => :desc).limit(20) assert changesets.size <= 20 get :list, {:format => "html"} assert_response :success @@ -1762,7 +1762,7 @@ EOF ## # This should display the last 20 changesets closed. def test_feed - changesets = Changeset.find(:all, :order => "created_at DESC", :conditions => ['num_changes > 0'], :limit=> 20) + changesets = Changeset.where("num_changes > 0").order(:created_at => :desc).limit(20) assert changesets.size <= 20 get :feed, {:format => "atom"} assert_response :success