summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-16 15:36:05 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-16 15:36:05 +0000
commitb81a578eb63bf49b0eecc69bdd1094d02540008a (patch)
treefb227403a26225c33c4c947595a7c8ac8767b85e
parent8593e347226515bb563c5e338c6de8d0c218a688 (diff)
downloadredmine-b81a578eb63bf49b0eecc69bdd1094d02540008a.tar.gz
redmine-b81a578eb63bf49b0eecc69bdd1094d02540008a.zip
Adjust tests for new fixture.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10404 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/wiki_controller_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index f4e82d7d0..b210b891f 100644
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -605,13 +605,13 @@ class WikiControllerTest < ActionController::TestCase
assert_nil WikiPage.find_by_title('Child_1').parent
end
- def test_destroy_child
+ def test_destroy_a_page_without_children_should_not_ask_confirmation
@request.session[:user_id] = 2
- delete :destroy, :project_id => 1, :id => 'Child_1'
+ delete :destroy, :project_id => 1, :id => 'Child_2'
assert_redirected_to :action => 'index', :project_id => 'ecookbook'
end
- def test_destroy_parent
+ def test_destroy_parent_should_ask_confirmation
@request.session[:user_id] = 2
assert_no_difference('WikiPage.count') do
delete :destroy, :project_id => 1, :id => 'Another_page'
@@ -620,7 +620,7 @@ class WikiControllerTest < ActionController::TestCase
assert_template 'destroy'
end
- def test_destroy_parent_with_nullify
+ def test_destroy_parent_with_nullify_should_delete_parent_only
@request.session[:user_id] = 2
assert_difference('WikiPage.count', -1) do
delete :destroy, :project_id => 1, :id => 'Another_page', :todo => 'nullify'
@@ -629,9 +629,9 @@ class WikiControllerTest < ActionController::TestCase
assert_nil WikiPage.find_by_id(2)
end
- def test_destroy_parent_with_cascade
+ def test_destroy_parent_with_cascade_should_delete_descendants
@request.session[:user_id] = 2
- assert_difference('WikiPage.count', -3) do
+ assert_difference('WikiPage.count', -4) do
delete :destroy, :project_id => 1, :id => 'Another_page', :todo => 'destroy'
end
assert_redirected_to :action => 'index', :project_id => 'ecookbook'