X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/89c677d8819ed2087a9427fb234253c0fff56a55..b9c9d6c1aafdd60c72b54345b4d2dc94317298a0:/test/functional/old_way_controller_test.rb diff --git a/test/functional/old_way_controller_test.rb b/test/functional/old_way_controller_test.rb index c6d4ce240..31da1d2c7 100644 --- a/test/functional/old_way_controller_test.rb +++ b/test/functional/old_way_controller_test.rb @@ -1,18 +1,9 @@ require File.dirname(__FILE__) + '/../test_helper' require 'old_way_controller' -# Re-raise errors caught by the controller. -class OldWayController; def rescue_action(e) raise e end; end - -class OldWayControllerTest < Test::Unit::TestCase +class OldWayControllerTest < ActionController::TestCase api_fixtures - def setup - @controller = OldWayController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new - end - # ------------------------------------- # Test reading old ways. # ------------------------------------- @@ -74,7 +65,8 @@ class OldWayControllerTest < Test::Unit::TestCase end ## - # + # look at all the versions of the way in the history and get each version from + # the versions call. check that they're the same. def check_history_equals_versions(way_id) get :history, :id => way_id assert_response :success, "can't get way #{way_id} from API" @@ -94,16 +86,4 @@ class OldWayControllerTest < Test::Unit::TestCase end end - ## - # for some reason assert_equal a, b fails when the ways are actually - # equal, so this method manually checks the fields... - def assert_ways_are_equal(a, b) - assert_equal a.id, b.id, "way IDs" - assert_equal a.changeset_id, b.changeset_id, "changeset ID on way #{a.id}" - assert_equal a.visible, b.visible, "visible on way #{a.id}" - assert_equal a.version, b.version, "version on way #{a.id}" - assert_equal a.tags, b.tags, "tags on way #{a.id}" - assert_equal a.nds, b.nds, "node references on way #{a.id}" - end - end