]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/changeset_controller_test.rb
Merge remote-tracking branch 'openstreetmap/pull/1395'
[rails.git] / test / controllers / changeset_controller_test.rb
index e77083f2d0a169767c50ebc0ca3f675375a8cd74..ca2ff8e159ee1339bd48d3b0a0a43e1cac86c24b 100644 (file)
@@ -1388,7 +1388,10 @@ EOF
   end
 
   def test_changeset_download
+    tag = create(:old_node_tag, :old_node => nodes(:used_node_2))
+
     get :download, :id => changesets(:normal_user_first_change).id
+
     assert_response :success
     assert_template nil
     # print @response.body
@@ -1396,7 +1399,7 @@ EOF
     assert_select "osmChange[version='#{API_VERSION}'][generator='#{GENERATOR}']" do
       assert_select "create", :count => 5
       assert_select "create>node[id='#{nodes(:used_node_2).node_id}'][visible='#{nodes(:used_node_2).visible?}'][version='#{nodes(:used_node_2).version}']" do
-        assert_select "tag[k='#{node_tags(:t3).k}'][v='#{node_tags(:t3).v}']"
+        assert_select "tag[k='#{tag.k}'][v='#{tag.v}']"
       end
       assert_select "create>node[id='#{nodes(:visible_node).node_id}']"
     end
@@ -1648,6 +1651,7 @@ EOF
 
     ## Now try with the public user
     changeset = changesets(:public_user_first_change)
+    create(:changeset_tag, :changeset => changeset)
     new_changeset = changeset.to_xml
     new_tag = XML::Node.new "tag"
     new_tag["k"] = "tagtesting"