summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-31 16:56:31 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-31 16:56:31 +0000
commit9f8053a82ebac92bc766f3207ff22e248cbcad9e (patch)
tree00e0593dc225b78031e58e36b1a326539ede87cd /test
parent62f9b56c1e6973f204ed289f96136db6a74b8b5b (diff)
downloadredmine-9f8053a82ebac92bc766f3207ff22e248cbcad9e.tar.gz
redmine-9f8053a82ebac92bc766f3207ff22e248cbcad9e.zip
Merged r15749 (#23700).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15771 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/wiki_controller_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index cd3bf0a76..8012f97a9 100644
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -223,6 +223,15 @@ class WikiControllerTest < ActionController::TestCase
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