assert_difference "NoteComment.count", 1 do
assert_no_difference "ActionMailer::Base.deliveries.size" do
perform_enqueued_jobs do
assert_difference "NoteComment.count", 1 do
assert_no_difference "ActionMailer::Base.deliveries.size" do
perform_enqueued_jobs do
assert_difference "NoteComment.count", 1 do
assert_difference "ActionMailer::Base.deliveries.size", 2 do
assert_difference "NoteComment.count", 1 do
assert_difference "ActionMailer::Base.deliveries.size", 2 do
assert_no_difference "NoteComment.count" do
post comment_api_note_path(open_note_with_comment), :headers => auth_header
assert_no_difference "NoteComment.count" do
post comment_api_note_path(open_note_with_comment), :headers => auth_header
post close_api_note_path(open_note_with_comment, :text => "This is a close comment", :format => "json")
assert_response :unauthorized
post close_api_note_path(open_note_with_comment, :text => "This is a close comment", :format => "json")
assert_response :unauthorized
post close_api_note_path(open_note_with_comment, :text => "This is a close comment", :format => "json"), :headers => auth_header
assert_response :success
post close_api_note_path(open_note_with_comment, :text => "This is a close comment", :format => "json"), :headers => auth_header
assert_response :success
post close_api_note_path(12345), :headers => auth_header
assert_response :not_found
post close_api_note_path(12345), :headers => auth_header
assert_response :not_found
post reopen_api_note_path(closed_note_with_comment, :text => "This is a reopen comment", :format => "json")
assert_response :unauthorized
post reopen_api_note_path(closed_note_with_comment, :text => "This is a reopen comment", :format => "json")
assert_response :unauthorized
post reopen_api_note_path(closed_note_with_comment, :text => "This is a reopen comment", :format => "json"), :headers => auth_header
assert_response :success
post reopen_api_note_path(closed_note_with_comment, :text => "This is a reopen comment", :format => "json"), :headers => auth_header
assert_response :success
post reopen_api_note_path(12345), :headers => auth_header
assert_response :not_found
post reopen_api_note_path(12345), :headers => auth_header
assert_response :not_found
delete api_note_path(open_note_with_comment, :text => "This is a hide comment", :format => "json")
assert_response :unauthorized
delete api_note_path(open_note_with_comment, :text => "This is a hide comment", :format => "json")
assert_response :unauthorized
delete api_note_path(open_note_with_comment, :text => "This is a hide comment", :format => "json"), :headers => auth_header
assert_response :forbidden
delete api_note_path(open_note_with_comment, :text => "This is a hide comment", :format => "json"), :headers => auth_header
assert_response :forbidden
delete api_note_path(open_note_with_comment, :text => "This is a hide comment", :format => "json"), :headers => auth_header
assert_response :success
delete api_note_path(open_note_with_comment, :text => "This is a hide comment", :format => "json"), :headers => auth_header
assert_response :success
delete api_note_path(12345, :format => "json")
assert_response :unauthorized
delete api_note_path(12345, :format => "json")
assert_response :unauthorized
delete api_note_path(12345, :format => "json"), :headers => auth_header
assert_response :forbidden
delete api_note_path(12345, :format => "json"), :headers => auth_header
assert_response :forbidden
delete api_note_path(12345, :format => "json"), :headers => auth_header
assert_response :not_found
delete api_note_path(12345, :format => "json"), :headers => auth_header
assert_response :not_found