diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-08-30 19:21:42 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-08-30 19:21:42 +0000 |
commit | 650a64cb0020ac849eaefb20abbbb090abcb6b3d (patch) | |
tree | bde24d7f46e7406aa7ff59d030a9cc1c6e2d68ef /test | |
parent | 0925ce756c30883692d4ba76dff69507f21525e6 (diff) | |
download | redmine-650a64cb0020ac849eaefb20abbbb090abcb6b3d.tar.gz redmine-650a64cb0020ac849eaefb20abbbb090abcb6b3d.zip |
Creating a wiki page named "Sidebar" without proper permission raises an exception (#23700).
git-svn-id: http://svn.redmine.org/redmine/trunk@15749 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index ea200b60d..1cc0a3b7d 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -216,6 +216,15 @@ class WikiControllerTest < Redmine::ControllerTest assert_select_error 'Title has already been taken' end + def test_post_new_with_protected_title_should_display_errors + Role.find(1).remove_permission!(:protect_wiki_pages) + @request.session[:user_id] = 2 + + post :new, :params => {:project_id => 'ecookbook', :title => 'Sidebar'} + assert_response :success + assert_select_error /Title/ + end + def test_post_new_xhr_with_invalid_title_should_display_errors @request.session[:user_id] = 2 |