Changed ProjectsController#destroy to DELETE only.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8152 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-12-10 09:32:41 +00:00
parent 7dc8cf9340
commit 467503fd4b
4 changed files with 11 additions and 17 deletions
+4 -4
View File
@@ -410,17 +410,17 @@ class ProjectsControllerTest < ActionController::TestCase
assert_response :method_not_allowed
end
def test_get_destroy
def test_destroy_without_confirmation
@request.session[:user_id] = 1 # admin
get :destroy, :id => 1
delete :destroy, :id => 1
assert_response :success
assert_template 'destroy'
assert_not_nil Project.find_by_id(1)
end
def test_post_destroy
def test_destroy
@request.session[:user_id] = 1 # admin
post :destroy, :id => 1, :confirm => 1
delete :destroy, :id => 1, :confirm => 1
assert_redirected_to '/admin/projects'
assert_nil Project.find_by_id(1)
end