diff options
Diffstat (limited to 'test/functional/issues_controller_test.rb')
-rw-r--r-- | test/functional/issues_controller_test.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 81312123c..38bf87ce3 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -4917,6 +4917,24 @@ class IssuesControllerTest < Redmine::ControllerTest assert_equal spent_hours_before + 2.5, issue.spent_hours end + def test_put_update_should_check_add_issue_notes_permission + role = Role.find(1) + role.remove_permission! :add_issue_notes + @request.session[:user_id] = 2 + + assert_no_difference 'Journal.count' do + put( + :update, + :params => { + :id => 1, + :issue => { + :notes => 'New note' + } + } + ) + end + end + def test_put_update_should_preserve_parent_issue_even_if_not_visible parent = Issue.generate!(:project_id => 1, :is_private => true) issue = Issue.generate!(:parent_issue_id => parent.id) |