summaryrefslogtreecommitdiffstats
path: root/test/functional/journals_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/journals_controller_test.rb')
-rw-r--r--test/functional/journals_controller_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/journals_controller_test.rb b/test/functional/journals_controller_test.rb
index f231d10ee..e6a90185c 100644
--- a/test/functional/journals_controller_test.rb
+++ b/test/functional/journals_controller_test.rb
@@ -48,4 +48,12 @@ class JournalsControllerTest < ActionController::TestCase
assert_select_rjs :replace, 'journal-2-notes'
assert_equal 'Updated notes', Journal.find(2).notes
end
+
+ def test_post_edit_with_empty_notes
+ @request.session[:user_id] = 1
+ xhr :post, :edit, :id => 2, :notes => ''
+ assert_response :success
+ assert_select_rjs :remove, 'change-2'
+ assert_nil Journal.find_by_id(2)
+ end
end