Private issue notes (#1554).
Adds 2 new permissions for viewing/adding private comments to issues. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10547 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -149,4 +149,18 @@ class ActivitiesControllerTest < ActionController::TestCase
|
||||
assert_template 'common/feed'
|
||||
assert_tag :tag => 'title', :content => /Issues/
|
||||
end
|
||||
|
||||
def test_index_should_show_private_notes_with_permission_only
|
||||
journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Private notes with searchkeyword', :private_notes => true)
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_include journal, assigns(:events_by_day).values.flatten
|
||||
|
||||
Role.find(1).remove_permission! :view_private_notes
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_not_include journal, assigns(:events_by_day).values.flatten
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user