X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7e1a4b68849c5972fc0f86fdff988ffdce60f765..672c79c79cf81b43ce958c9c7298be0e14fa9acf:/test/controllers/api/changeset_comments_controller_test.rb diff --git a/test/controllers/api/changeset_comments_controller_test.rb b/test/controllers/api/changeset_comments_controller_test.rb index 64871baa3..26500babd 100644 --- a/test/controllers/api/changeset_comments_controller_test.rb +++ b/test/controllers/api/changeset_comments_controller_test.rb @@ -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 ## @@ -214,7 +226,7 @@ module Api assert_response :forbidden # Try again, after agreement with the terms - user.terms_agreed = Time.now + user.terms_agreed = Time.now.utc user.save! assert_difference "ChangesetComment.count", 1 do @@ -237,7 +249,7 @@ module Api assert_response :forbidden # Try again, after agreement with the terms - user.terms_agreed = Time.now + user.terms_agreed = Time.now.utc user.save! assert_difference "ChangesetComment.count", 1 do