Fixed that destroying a user from the edit page returns a 404 response (#11691).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10240 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-08-26 10:50:59 +00:00
parent ebc979e9b1
commit c68ee7f545
3 changed files with 9 additions and 2 deletions

View File

@@ -349,6 +349,13 @@ class UsersControllerTest < ActionController::TestCase
assert_response 403
end
def test_destroy_should_redirect_to_back_url_param
assert_difference 'User.count', -1 do
delete :destroy, :id => 2, :back_url => '/users?name=foo'
end
assert_redirected_to '/users?name=foo'
end
def test_create_membership
assert_difference 'Member.count' do
post :edit_membership, :id => 7, :membership => { :project_id => 3, :role_ids => [2]}