]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/changeset_controller_test.rb
Pluralize nodes, ways and relations controllers
[rails.git] / test / controllers / changeset_controller_test.rb
index 2cda68b128045473d9dbfe662b300e1947337114..472ebb25942c70e689cdc12c99a0bf4588bf42ef 100644 (file)
@@ -1528,7 +1528,7 @@ CHANGESET
     changeset_id = @response.body.to_i
 
     # add a single node to it
-    with_controller(NodeController.new) do
+    with_controller(NodesController.new) do
       content "<osm><node lon='1' lat='2' changeset='#{changeset_id}'/></osm>"
       put :create
       assert_response :success, "Couldn't create node."
@@ -1543,7 +1543,7 @@ CHANGESET
     assert_select "osm>changeset[max_lat='2.0000000']", 1
 
     # add another node to it
-    with_controller(NodeController.new) do
+    with_controller(NodesController.new) do
       content "<osm><node lon='2' lat='1' changeset='#{changeset_id}'/></osm>"
       put :create
       assert_response :success, "Couldn't create second node."
@@ -1558,7 +1558,7 @@ CHANGESET
     assert_select "osm>changeset[max_lat='2.0000000']", 1
 
     # add (delete) a way to it, which contains a point at (3,3)
-    with_controller(WayController.new) do
+    with_controller(WaysController.new) do
       content update_changeset(way.to_xml, changeset_id)
       put :delete, :params => { :id => way.id }
       assert_response :success, "Couldn't delete a way."
@@ -1838,7 +1838,7 @@ CHANGESET
     changeset.num_changes = Changeset::MAX_ELEMENTS - offset
     changeset.save!
 
-    with_controller(NodeController.new) do
+    with_controller(NodesController.new) do
       # create a new node
       content "<osm><node changeset='#{cs_id}' lat='0.0' lon='0.0'/></osm>"
       put :create
@@ -2153,7 +2153,9 @@ CHANGESET
 
     assert_difference "ChangesetComment.count", 1 do
       assert_no_difference "ActionMailer::Base.deliveries.size" do
-        post :comment, :params => { :id => private_user_closed_changeset.id, :text => "This is a comment" }
+        perform_enqueued_jobs do
+          post :comment, :params => { :id => private_user_closed_changeset.id, :text => "This is a comment" }
+        end
       end
     end
     assert_response :success
@@ -2166,7 +2168,9 @@ CHANGESET
 
     assert_difference "ChangesetComment.count", 1 do
       assert_difference "ActionMailer::Base.deliveries.size", 1 do
-        post :comment, :params => { :id => changeset.id, :text => "This is a comment" }
+        perform_enqueued_jobs do
+          post :comment, :params => { :id => changeset.id, :text => "This is a comment" }
+        end
       end
     end
     assert_response :success
@@ -2182,7 +2186,9 @@ CHANGESET
 
     assert_difference "ChangesetComment.count", 1 do
       assert_difference "ActionMailer::Base.deliveries.size", 2 do
-        post :comment, :params => { :id => changeset.id, :text => "This is a comment" }
+        perform_enqueued_jobs do
+          post :comment, :params => { :id => changeset.id, :text => "This is a comment" }
+        end
       end
     end
     assert_response :success