diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2023-10-23 17:33:40 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2023-10-23 17:33:40 +0000 |
commit | f1437b7ec59ba9126d93b239d29c85820e7154e4 (patch) | |
tree | e958bf1f2b6aa7664e929b894b15448da446d030 /test/functional/wikis_controller_test.rb | |
parent | 94da4a33f5d9353d4b8228163462d5711721285f (diff) | |
download | redmine-f1437b7ec59ba9126d93b239d29c85820e7154e4.tar.gz redmine-f1437b7ec59ba9126d93b239d29c85820e7154e4.zip |
Reinitialize an empty Wiki page after after project wiki is deleted (#34634).
git-svn-id: https://svn.redmine.org/redmine/trunk@22370 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/wikis_controller_test.rb')
-rw-r--r-- | test/functional/wikis_controller_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/wikis_controller_test.rb b/test/functional/wikis_controller_test.rb index 9f3f9bffb..ecad3a4a4 100644 --- a/test/functional/wikis_controller_test.rb +++ b/test/functional/wikis_controller_test.rb @@ -35,13 +35,17 @@ class WikisControllerTest < Redmine::ControllerTest end end - def test_post_destroy_should_delete_wiki + def test_post_destroy_should_reinitialize_empty_wiki set_tmp_attachments_directory @request.session[:user_id] = 1 + wiki = Project.find(1).wiki post :destroy, :params => {:id => 1, :confirm => 1} assert_redirected_to :controller => 'projects', :action => 'show', :id => 'ecookbook' - assert_nil Project.find(1).wiki + + new_wiki = Project.find(1).wiki + assert_not_equal wiki, new_wiki + assert_equal "Wiki", new_wiki.start_page end def test_not_found |