diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-29 07:49:38 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-29 07:49:38 +0000 |
commit | 19d2529faa25f34edeb29ddbfe18db7732bf287b (patch) | |
tree | c980fa23c78d312f3220b656d9017746f4fec8f7 /test/unit/helpers | |
parent | 92068122ee3f47dc081bd48979a3745e6e24623e (diff) | |
download | redmine-19d2529faa25f34edeb29ddbfe18db7732bf287b.tar.gz redmine-19d2529faa25f34edeb29ddbfe18db7732bf287b.zip |
Check permission of wiki pages before generating a link to it (#23793).
Patch by Holger Just.
git-svn-id: http://svn.redmine.org/redmine/trunk@16283 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/helpers')
-rw-r--r-- | test/unit/helpers/application_helper_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index e6530e5c5..943f7a452 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -665,6 +665,7 @@ RAW end def test_wiki_links + User.current = User.find_by_login('jsmith') russian_eacape = CGI.escape(@russian_test) to_test = { '[[CookBook documentation]]' => @@ -746,6 +747,9 @@ RAW # project does not exist '[[unknowproject:Start]]' => '[[unknowproject:Start]]', '[[unknowproject:Start|Page title]]' => '[[unknowproject:Start|Page title]]', + # missing permission to view wiki in project + '[[private-child:]]' => '[[private-child:]]', + '[[private-child:Wiki]]' => '[[private-child:Wiki]]', } @project = Project.find(1) to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } |