summaryrefslogtreecommitdiffstats
path: root/test/functional/activities_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-10-03 21:36:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-10-03 21:36:19 +0000
commit0178b5a2fe07e1160348b99ac56c19ebf154ca1b (patch)
tree53f762a779c95b598815864bb674463d90ef64d6 /test/functional/activities_controller_test.rb
parentbb1563f23ffabcf948797e0d8806c3d5344d09a7 (diff)
downloadredmine-0178b5a2fe07e1160348b99ac56c19ebf154ca1b.tar.gz
redmine-0178b5a2fe07e1160348b99ac56c19ebf154ca1b.zip
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
Diffstat (limited to 'test/functional/activities_controller_test.rb')
-rw-r--r--test/functional/activities_controller_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb
index 13f44a108..234ea7c57 100644
--- a/test/functional/activities_controller_test.rb
+++ b/test/functional/activities_controller_test.rb
@@ -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