]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/api/relations_controller_test.rb
Underline time elements that have a title
[rails.git] / test / controllers / api / relations_controller_test.rb
index ec86e07a57ac242f60c71f11b90750695731b3df..cdef1f5bac8dea5da047f9c10c6bc527cbfd2c89 100644 (file)
@@ -102,7 +102,7 @@ module Api
       second_relation = create(:relation_member, :member => node).relation
       _super_relation = create(:relation_member, :member => second_relation).relation
       # should combine multiple relation_member references into just one relation entry
-      create(:relation_member, :member => node, :relation => relation_with_node, :sequence_id => 2)
+      create(:relation_member, :member => node, :relation => relation_with_node)
       # should not include deleted relations
       deleted_relation = create(:relation, :deleted)
       create(:relation_member, :member => node, :relation => deleted_relation)
@@ -122,7 +122,7 @@ module Api
       second_relation = create(:relation_member, :member => way).relation
       _super_relation = create(:relation_member, :member => second_relation).relation
       # should combine multiple relation_member references into just one relation entry
-      create(:relation_member, :member => way, :relation => relation_with_way, :sequence_id => 2)
+      create(:relation_member, :member => way, :relation => relation_with_way)
       # should not include deleted relations
       deleted_relation = create(:relation, :deleted)
       create(:relation_member, :member => way, :relation => deleted_relation)
@@ -142,7 +142,7 @@ module Api
       second_relation = create(:relation_member, :member => relation).relation
       _super_relation = create(:relation_member, :member => second_relation).relation
       # should combine multiple relation_member references into just one relation entry
-      create(:relation_member, :member => relation, :relation => relation_with_relation, :sequence_id => 2)
+      create(:relation_member, :member => relation, :relation => relation_with_relation)
       # should not include deleted relations
       deleted_relation = create(:relation, :deleted)
       create(:relation_member, :member => relation, :relation => deleted_relation)
@@ -612,8 +612,7 @@ module Api
 
       # valid delete should return the new version number, which should
       # be greater than the old version number
-      assert @response.body.to_i > multi_tag_relation.version,
-             "delete request should return a new version number for relation"
+      assert_operator @response.body.to_i, :>, multi_tag_relation.version, "delete request should return a new version number for relation"
 
       # this won't work since the relation is already deleted
       xml = update_changeset(xml_for_relation(deleted_relation), changeset.id)
@@ -915,7 +914,7 @@ module Api
       assert_response :success
 
       # count one osm element
-      assert_select "osm[version='#{Settings.api_version}'][generator='OpenStreetMap server']", 1
+      assert_select "osm[version='#{Settings.api_version}'][generator='#{Settings.generator}']", 1
 
       # we should have only the expected number of relations
       assert_select "osm>relation", expected_relations.size
@@ -1036,7 +1035,7 @@ module Api
       version = nil
 
       with_controller(Api::ChangesetsController.new) do
-        doc = OSM::API.new.get_xml_doc
+        doc = OSM::API.new.xml_doc
         change = XML::Node.new "osmChange"
         doc.root = change
         modify = XML::Node.new "modify"