]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/old_node_controller_test.rb
Added a changeset/#id/include method to POST to to expand the bounding box.
[rails.git] / test / functional / old_node_controller_test.rb
index ca9a114b154c11f969e96ae6d7ab0ec28c684e47..f1328e65091d7f7c26ac08176284db5efb080108 100644 (file)
@@ -1,18 +1,9 @@
 require File.dirname(__FILE__) + '/../test_helper'
 require 'old_node_controller'
 
-# Re-raise errors caught by the controller.
-class OldNodeController; def rescue_action(e) raise e end; end
-
-class OldNodeControllerTest < Test::Unit::TestCase
+class OldNodeControllerTest < ActionController::TestCase
   api_fixtures
 
-  def setup
-    @controller = OldNodeController.new
-    @request    = ActionController::TestRequest.new
-    @response   = ActionController::TestResponse.new
-  end
-
   #
   # TODO: test history
   #
@@ -112,20 +103,6 @@ class OldNodeControllerTest < Test::Unit::TestCase
     assert_nodes_are_equal current_node, old_node
   end
 
-  ##
-  # for some reason a==b is false, but there doesn't seem to be any 
-  # difference between the nodes, so i'm checking all the attributes 
-  # manually and blaming it on ActiveRecord
-  def assert_nodes_are_equal(a, b)
-    assert_equal a.id, b.id, "node IDs"
-    assert_equal a.latitude, b.latitude, "latitude on node #{a.id}"
-    assert_equal a.longitude, b.longitude, "longitude on node #{a.id}"
-    assert_equal a.changeset_id, b.changeset_id, "changeset ID on node #{a.id}"
-    assert_equal a.visible, b.visible, "visible on node #{a.id}"
-    assert_equal a.version, b.version, "version on node #{a.id}"
-    assert_equal a.tags, b.tags, "tags on node #{a.id}"
-  end
-
   ##
   # returns a 16 character long string with some nasty characters in it.
   # this ought to stress-test the tag handling as well as the versioning.