Reject note comments with no text
[rails.git] / test / functional / notes_controller_test.rb
index 6e6a3c17c22f436d03a14371e39166b3035d7873..3d12d151f8c78c5a31260ae8d9daa6904adb7ad6 100644 (file)
@@ -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