X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d74d4f8d195673250c3f2e841d28f185d74d8849..618b09a8ab6aa12b86e9702185740a9be6260e18:/test/functional/notes_controller_test.rb?ds=sidebyside diff --git a/test/functional/notes_controller_test.rb b/test/functional/notes_controller_test.rb index 0b52d035e..a4720eb06 100644 --- a/test/functional/notes_controller_test.rb +++ b/test/functional/notes_controller_test.rb @@ -197,6 +197,20 @@ class NotesControllerTest < ActionController::TestCase end end assert_response :bad_request + + assert_no_difference('Note.count') do + assert_no_difference('NoteComment.count') do + post :create, {:lat => 'abc', :lon => -1.0, :text => "This is a comment"} + end + end + assert_response :bad_request + + assert_no_difference('Note.count') do + assert_no_difference('NoteComment.count') do + post :create, {:lat => -1.0, :lon => 'abc', :text => "This is a comment"} + end + end + assert_response :bad_request end def test_comment_success