fix member validate test of empty role at unit test

Id 2 user is already assigned.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8046 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-12-03 14:33:02 +00:00
parent a2d515adce
commit 3d1e6f5b96
1 changed files with 5 additions and 1 deletions

View File

@ -67,8 +67,12 @@ class MemberTest < ActiveSupport::TestCase
# same use can't have more than one membership for a project
assert !member.save
member = Member.new(:project_id => 1, :user_id => 2, :role_ids => [])
# must have one role at least
user = User.new(:firstname => "new1", :lastname => "user1", :mail => "test_validate@somenet.foo")
user.login = "test_validate"
user.password, user.password_confirmation = "password", "password"
assert user.save
member = Member.new(:project_id => 1, :user_id => user.id, :role_ids => [])
assert !member.save
end