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:
parent
a2d515adce
commit
3d1e6f5b96
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue