diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-10-28 20:46:09 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-10-28 20:46:09 +0000 |
commit | 2c802a2bdf3ad125a4051f9b04a96a9b51e0661b (patch) | |
tree | 56d98827b40d1298c62db49b2b4a2e69820f73c9 /test/functional/wiki_controller_test.rb | |
parent | a5a086eba16af67f9841a617dac6942b73d8e5af (diff) | |
download | redmine-2c802a2bdf3ad125a4051f9b04a96a9b51e0661b.tar.gz redmine-2c802a2bdf3ad125a4051f9b04a96a9b51e0661b.zip |
Merged r22913-r22917 from trunk to 5.1-stable (#40946).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@23167 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 1e1d98f32..ad5d34b58 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -150,6 +150,17 @@ class WikiControllerTest < Redmine::ControllerTest end end + def test_show_should_not_display_watchers_without_permission + @request.session[:user_id] = 2 + Role.find(1).remove_permission! :view_wiki_page_watchers + page = Project.find(1).wiki.find_page('Another_page') + page.add_watcher User.find(2) + page.add_watcher Group.find(10) + get(:show, :params => {:project_id => 1, :id => 'Another_page'}) + assert_select 'div#watchers ul', 0 + assert_select 'h3', {text: /Watchers \(\d*\)/, count: 0} + end + def test_show_should_display_section_edit_links with_settings :text_formatting => 'textile' do @request.session[:user_id] = 2 |