diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-10-26 15:59:20 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-10-26 15:59:20 +0000 |
commit | 70bf0706b2f7933f72cbd4daab8e43b0ac9de4e9 (patch) | |
tree | d16352cdf618416b29e864f1a8fb73b62a9f259d /test/functional | |
parent | 17eab0f5f9ecec337380f3cf8232da2aa32a5d99 (diff) | |
download | redmine-70bf0706b2f7933f72cbd4daab8e43b0ac9de4e9.tar.gz redmine-70bf0706b2f7933f72cbd4daab8e43b0ac9de4e9.zip |
Refactor: convert WikiController#destroy to use HTTP DELETE
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4295 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index fecde6159..9124dad34 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -196,14 +196,14 @@ class WikiControllerTest < ActionController::TestCase def test_destroy_child @request.session[:user_id] = 2 - post :destroy, :project_id => 1, :page => 'Child_1' + delete :destroy, :project_id => 1, :page => 'Child_1' assert_redirected_to :action => 'index', :project_id => 'ecookbook' end def test_destroy_parent @request.session[:user_id] = 2 assert_no_difference('WikiPage.count') do - post :destroy, :project_id => 1, :page => 'Another_page' + delete :destroy, :project_id => 1, :page => 'Another_page' end assert_response :success assert_template 'destroy' @@ -212,7 +212,7 @@ class WikiControllerTest < ActionController::TestCase def test_destroy_parent_with_nullify @request.session[:user_id] = 2 assert_difference('WikiPage.count', -1) do - post :destroy, :project_id => 1, :page => 'Another_page', :todo => 'nullify' + delete :destroy, :project_id => 1, :page => 'Another_page', :todo => 'nullify' end assert_redirected_to :action => 'index', :project_id => 'ecookbook' assert_nil WikiPage.find_by_id(2) @@ -221,7 +221,7 @@ class WikiControllerTest < ActionController::TestCase def test_destroy_parent_with_cascade @request.session[:user_id] = 2 assert_difference('WikiPage.count', -3) do - post :destroy, :project_id => 1, :page => 'Another_page', :todo => 'destroy' + delete :destroy, :project_id => 1, :page => 'Another_page', :todo => 'destroy' end assert_redirected_to :action => 'index', :project_id => 'ecookbook' assert_nil WikiPage.find_by_id(2) @@ -231,7 +231,7 @@ class WikiControllerTest < ActionController::TestCase def test_destroy_parent_with_reassign @request.session[:user_id] = 2 assert_difference('WikiPage.count', -1) do - post :destroy, :project_id => 1, :page => 'Another_page', :todo => 'reassign', :reassign_to_id => 1 + delete :destroy, :project_id => 1, :page => 'Another_page', :todo => 'reassign', :reassign_to_id => 1 end assert_redirected_to :action => 'index', :project_id => 'ecookbook' assert_nil WikiPage.find_by_id(2) |