summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-01-24 05:38:22 +0000
committerGo MAEDA <maeda@farend.jp>2021-01-24 05:38:22 +0000
commit091dd36accf8cb26b66a1307bd0899b3ca1e3c33 (patch)
treed8b4c2f350709264b0076769aaea6a11ca7e0252 /test
parent0f4228d4e6dca2b23409b8a67632c473e0426555 (diff)
downloadredmine-091dd36accf8cb26b66a1307bd0899b3ca1e3c33.tar.gz
redmine-091dd36accf8cb26b66a1307bd0899b3ca1e3c33.zip
Show a warning message for watchers who cannot view the object (#33329).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20725 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index d62c9f2c1..1762c7efd 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -2657,6 +2657,21 @@ class IssuesControllerTest < Redmine::ControllerTest
end
end
+ def test_show_should_mark_invalid_watchers
+ @request.session[:user_id] = 2
+ issue = Issue.find(4)
+ issue.add_watcher User.find(4)
+
+ get :show, :params => {:id => issue.id}
+
+ assert_response :success
+ assert_select 'div#watchers ul' do
+ assert_select 'li.user-4' do
+ assert_select 'span.icon-warning[title=?]', l(:notice_invalid_watcher), text: l(:notice_invalid_watcher)
+ end
+ end
+ end
+
def test_show_with_thumbnails_enabled_should_display_thumbnails
skip unless convert_installed?
@request.session[:user_id] = 2