mirror of
https://github.com/redmine/redmine.git
synced 2026-07-01 00:18:56 +02:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user