]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/api/changeset_comments_controller_test.rb
Merge pull request #3495 from mmd-osm/patch/json_cs
[rails.git] / test / controllers / api / changeset_comments_controller_test.rb
index ce7c08a659d8b63269b7d8fb353d486e1eb6f15a..26500babdcb24f47b727c3be384ecc084a668db8 100644 (file)
@@ -9,14 +9,26 @@ module Api
         { :path => "/api/0.6/changeset/1/comment", :method => :post },
         { :controller => "api/changeset_comments", :action => "create", :id => "1" }
       )
+      assert_routing(
+        { :path => "/api/0.6/changeset/1/comment.json", :method => :post },
+        { :controller => "api/changeset_comments", :action => "create", :id => "1", :format => "json" }
+      )
       assert_routing(
         { :path => "/api/0.6/changeset/comment/1/hide", :method => :post },
         { :controller => "api/changeset_comments", :action => "destroy", :id => "1" }
       )
+      assert_routing(
+        { :path => "/api/0.6/changeset/comment/1/hide.json", :method => :post },
+        { :controller => "api/changeset_comments", :action => "destroy", :id => "1", :format => "json" }
+      )
       assert_routing(
         { :path => "/api/0.6/changeset/comment/1/unhide", :method => :post },
         { :controller => "api/changeset_comments", :action => "restore", :id => "1" }
       )
+      assert_routing(
+        { :path => "/api/0.6/changeset/comment/1/unhide.json", :method => :post },
+        { :controller => "api/changeset_comments", :action => "restore", :id => "1", :format => "json" }
+      )
     end
 
     ##