Reject attempts to create notes with no comment text
[rails.git] / test / functional / notes_controller_test.rb
index 3d12d151f8c78c5a31260ae8d9daa6904adb7ad6..2b880943c39dc27930a7db47a8201e6df74e68f9 100644 (file)
@@ -173,6 +173,13 @@ class NotesControllerTest < ActionController::TestCase
     end
     assert_response :bad_request
 
+    assert_no_difference('Note.count') do
+      assert_no_difference('NoteComment.count') do
+        post :create, {:lat => -1.0, :lon => -1.0, :text => ""}
+      end
+    end
+    assert_response :bad_request
+
     assert_no_difference('Note.count') do
       assert_no_difference('NoteComment.count') do
         post :create, {:lat => -100.0, :lon => -1.0, :text => "This is a comment"}