Adds a test for wiki destroy confirmation.

git-svn-id: http://svn.redmine.org/redmine/trunk@16661 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2017-06-10 23:55:51 +00:00
parent c237bcd504
commit fc2b4cfc3c

View File

@@ -65,7 +65,15 @@ class WikisControllerTest < Redmine::ControllerTest
assert_equal 'Other start page', wiki.start_page
end
def test_destroy
def test_get_destroy_should_ask_confirmation
@request.session[:user_id] = 1
assert_no_difference 'Wiki.count' do
get :destroy, :params => {:id => 1}
assert_response :success
end
end
def test_post_destroy_should_delete_wiki
@request.session[:user_id] = 1
post :destroy, :params => {:id => 1, :confirm => 1}
assert_redirected_to :controller => 'projects',