Adds a few tests.

git-svn-id: http://svn.redmine.org/redmine/trunk@13695 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2014-12-03 20:21:03 +00:00
parent 1059f9a99e
commit 5222650d95
9 changed files with 127 additions and 3 deletions

View File

@@ -239,6 +239,17 @@ class UsersControllerTest < ActionController::TestCase
assert user.check_password?(password)
end
def test_create_and_continue
post :create, :user => {
:login => 'randompass',
:firstname => 'Random',
:lastname => 'Pass',
:mail => 'randompass@example.net',
:generate_password => '1'
}, :continue => '1'
assert_redirected_to '/users/new?user%5Bgenerate_password%5D=1'
end
def test_create_with_failure
assert_no_difference 'User.count' do
post :create, :user => {}