X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/98bfaace9aeba7fb387596cc16b2e661506173c6..28726e5f11cb46add4e6b86eb9a958798b83c46a:/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 e25926c78..e7d8ca209 100644 --- a/test/controllers/api/changeset_comments_controller_test.rb +++ b/test/controllers/api/changeset_comments_controller_test.rb @@ -225,21 +225,21 @@ module Api comment = create(:changeset_comment) assert comment.visible - post changeset_comment_hide_path(:id => comment) + post changeset_comment_hide_path(comment) assert_response :unauthorized assert comment.reload.visible auth_header = basic_authorization_header create(:user).email, "test" # not a moderator - post changeset_comment_hide_path(:id => comment), :headers => auth_header + post changeset_comment_hide_path(comment), :headers => auth_header assert_response :forbidden assert comment.reload.visible auth_header = basic_authorization_header create(:moderator_user).email, "test" # bad comment id - post changeset_comment_hide_path(:id => 999111), :headers => auth_header + post changeset_comment_hide_path(999111), :headers => auth_header assert_response :not_found assert comment.reload.visible end @@ -252,7 +252,7 @@ module Api auth_header = basic_authorization_header create(:moderator_user).email, "test" - post changeset_comment_hide_path(:id => comment), :headers => auth_header + post changeset_comment_hide_path(comment), :headers => auth_header assert_response :success assert_not comment.reload.visible end @@ -264,21 +264,21 @@ module Api comment = create(:changeset_comment, :visible => false) assert_not comment.visible - post changeset_comment_unhide_path(:id => comment) + post changeset_comment_unhide_path(comment) assert_response :unauthorized assert_not comment.reload.visible auth_header = basic_authorization_header create(:user).email, "test" # not a moderator - post changeset_comment_unhide_path(:id => comment), :headers => auth_header + post changeset_comment_unhide_path(comment), :headers => auth_header assert_response :forbidden assert_not comment.reload.visible auth_header = basic_authorization_header create(:moderator_user).email, "test" # bad comment id - post changeset_comment_unhide_path(:id => 999111), :headers => auth_header + post changeset_comment_unhide_path(999111), :headers => auth_header assert_response :not_found assert_not comment.reload.visible end @@ -291,7 +291,7 @@ module Api auth_header = basic_authorization_header create(:moderator_user).email, "test" - post changeset_comment_unhide_path(:id => comment), :headers => auth_header + post changeset_comment_unhide_path(comment), :headers => auth_header assert_response :success assert comment.reload.visible end