summaryrefslogtreecommitdiffstats
path: root/test/functional/users_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-08-26 10:50:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-08-26 10:50:59 +0000
commitc68ee7f5458dd45f04913354e4e16ee20ce82c2d (patch)
tree861c0ec4a1658bcff615eb2953ce7aac60d5cb7e /test/functional/users_controller_test.rb
parentebc979e9b1b70bab7bce5079ab7d19b333274514 (diff)
downloadredmine-c68ee7f5458dd45f04913354e4e16ee20ce82c2d.tar.gz
redmine-c68ee7f5458dd45f04913354e4e16ee20ce82c2d.zip
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
Diffstat (limited to 'test/functional/users_controller_test.rb')
-rw-r--r--test/functional/users_controller_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 3d4f08487..db912bf6d 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -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]}