diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-06-10 23:55:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-06-10 23:55:51 +0000 |
commit | fc2b4cfc3c41562d877cdfe7e1315a387ed7eb19 (patch) | |
tree | 520e6f708d865a253350ca4eaed116e36e343fc7 | |
parent | c237bcd5049c70f95ba267f9df46fbbb865d92f1 (diff) | |
download | redmine-fc2b4cfc3c41562d877cdfe7e1315a387ed7eb19.tar.gz redmine-fc2b4cfc3c41562d877cdfe7e1315a387ed7eb19.zip |
Adds a test for wiki destroy confirmation.
git-svn-id: http://svn.redmine.org/redmine/trunk@16661 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/wikis_controller_test.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/functional/wikis_controller_test.rb b/test/functional/wikis_controller_test.rb index ed68269ce..c047f438b 100644 --- a/test/functional/wikis_controller_test.rb +++ b/test/functional/wikis_controller_test.rb @@ -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', |