diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-10 09:10:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-10 09:10:51 +0000 |
commit | 52a7fa6176c8248033b4734773e15dd8b60b2f20 (patch) | |
tree | 48ad634039fb55622a2ebbe63f005baf5c2b5cb1 /test/functional/issues_controller_test.rb | |
parent | a1ae0aed238d3b49af69c895ac72f9b39684f980 (diff) | |
download | redmine-52a7fa6176c8248033b4734773e15dd8b60b2f20.tar.gz redmine-52a7fa6176c8248033b4734773e15dd8b60b2f20.zip |
Changed IssuesController#destroy to DELETE only.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8150 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issues_controller_test.rb')
-rw-r--r-- | test/functional/issues_controller_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 951cf90be..12f5d37b2 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1997,14 +1997,14 @@ class IssuesControllerTest < ActionController::TestCase def test_destroy_issue_with_no_time_entries assert_nil TimeEntry.find_by_issue_id(2) @request.session[:user_id] = 2 - post :destroy, :id => 2 + delete :destroy, :id => 2 assert_redirected_to :action => 'index', :project_id => 'ecookbook' assert_nil Issue.find_by_id(2) end def test_destroy_issues_with_time_entries @request.session[:user_id] = 2 - post :destroy, :ids => [1, 3] + delete :destroy, :ids => [1, 3] assert_response :success assert_template 'destroy' assert_not_nil assigns(:hours) @@ -2013,7 +2013,7 @@ class IssuesControllerTest < ActionController::TestCase def test_destroy_issues_and_destroy_time_entries @request.session[:user_id] = 2 - post :destroy, :ids => [1, 3], :todo => 'destroy' + delete :destroy, :ids => [1, 3], :todo => 'destroy' assert_redirected_to :action => 'index', :project_id => 'ecookbook' assert !(Issue.find_by_id(1) || Issue.find_by_id(3)) assert_nil TimeEntry.find_by_id([1, 2]) @@ -2021,7 +2021,7 @@ class IssuesControllerTest < ActionController::TestCase def test_destroy_issues_and_assign_time_entries_to_project @request.session[:user_id] = 2 - post :destroy, :ids => [1, 3], :todo => 'nullify' + delete :destroy, :ids => [1, 3], :todo => 'nullify' assert_redirected_to :action => 'index', :project_id => 'ecookbook' assert !(Issue.find_by_id(1) || Issue.find_by_id(3)) assert_nil TimeEntry.find(1).issue_id @@ -2030,7 +2030,7 @@ class IssuesControllerTest < ActionController::TestCase def test_destroy_issues_and_reassign_time_entries_to_another_issue @request.session[:user_id] = 2 - post :destroy, :ids => [1, 3], :todo => 'reassign', :reassign_to_id => 2 + delete :destroy, :ids => [1, 3], :todo => 'reassign', :reassign_to_id => 2 assert_redirected_to :action => 'index', :project_id => 'ecookbook' assert !(Issue.find_by_id(1) || Issue.find_by_id(3)) assert_equal 2, TimeEntry.find(1).issue_id @@ -2039,7 +2039,7 @@ class IssuesControllerTest < ActionController::TestCase def test_destroy_issues_from_different_projects @request.session[:user_id] = 2 - post :destroy, :ids => [1, 2, 6], :todo => 'destroy' + delete :destroy, :ids => [1, 2, 6], :todo => 'destroy' assert_redirected_to :controller => 'issues', :action => 'index' assert !(Issue.find_by_id(1) || Issue.find_by_id(2) || Issue.find_by_id(6)) end @@ -2051,7 +2051,7 @@ class IssuesControllerTest < ActionController::TestCase @request.session[:user_id] = 2 assert_difference 'Issue.count', -2 do - post :destroy, :ids => [parent.id, child.id], :todo => 'destroy' + delete :destroy, :ids => [parent.id, child.id], :todo => 'destroy' end assert_response 302 end |