summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-02-16 13:19:33 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-02-16 13:19:33 +0000
commit1c8cf4ef8338736ebcaa905f8932545a24e817c6 (patch)
tree1511225a9139cd3f2113c9b908a88c70f4166958 /test
parentabb0b15407b33cbe50dc263474631c5bfcf2bd5f (diff)
downloadredmine-1c8cf4ef8338736ebcaa905f8932545a24e817c6.tar.gz
redmine-1c8cf4ef8338736ebcaa905f8932545a24e817c6.zip
Added the following permissions (#527, #585, #627):
* edit_issue_notes: let user edit any notes * edit_own_issue_notes: let user edit his own notes only git-svn-id: http://redmine.rubyforge.org/svn/trunk@1152 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-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