- ##
- # create comment fail
- def test_create_fail
- # unauthorized
- post changeset_comment_path(create(:changeset, :closed), :text => "This is a comment")
- assert_response :unauthorized
-
- auth_header = bearer_authorization_header
+ def test_create_by_unauthorized
+ assert_no_difference "ChangesetComment.count" do
+ post changeset_comment_path(create(:changeset, :closed), :text => "This is a comment")
+ assert_response :unauthorized
+ end
+ end