X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/56db9ca2b7e2475cd8025630049fb4a4b824f2d9..8090e086daad67eac711ad6fd6a5eba6f28d44fd:/test/functional/notes_controller_test.rb diff --git a/test/functional/notes_controller_test.rb b/test/functional/notes_controller_test.rb index 1c0ded355..3d12d151f 100644 --- a/test/functional/notes_controller_test.rb +++ b/test/functional/notes_controller_test.rb @@ -227,6 +227,11 @@ class NotesControllerTest < ActionController::TestCase end assert_response :bad_request + assert_no_difference('NoteComment.count') do + post :comment, {:id => notes(:open_note_with_comment).id, :text => ""} + end + assert_response :bad_request + assert_no_difference('NoteComment.count') do post :comment, {:id => 12345, :text => "This is an additional comment"} end @@ -236,6 +241,11 @@ class NotesControllerTest < ActionController::TestCase post :comment, {:id => notes(:hidden_note_with_comment).id, :text => "This is an additional comment"} end assert_response :gone + + assert_no_difference('NoteComment.count') do + post :comment, {:id => notes(:closed_note_with_comment).id, :text => "This is an additional comment"} + end + assert_response :conflict end def test_note_close_success @@ -273,6 +283,9 @@ class NotesControllerTest < ActionController::TestCase post :close, {:id => notes(:hidden_note_with_comment).id} assert_response :gone + + post :close, {:id => notes(:closed_note_with_comment).id} + assert_response :conflict end def test_note_read_success