diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-04 05:20:42 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-04 05:20:42 +0000 |
commit | 747afd808839bc1cf5815f63888fa25ed2384f4f (patch) | |
tree | 582124b7c8ca498c80d344fa99386ca581020d1f | |
parent | a0a6571be31eb1f758941651d0d84391708bb915 (diff) | |
download | redmine-747afd808839bc1cf5815f63888fa25ed2384f4f.tar.gz redmine-747afd808839bc1cf5815f63888fa25ed2384f4f.zip |
add unit test of member_role validate
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8067 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/unit/member_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/member_test.rb b/test/unit/member_test.rb index deb04d95b..d8267158e 100644 --- a/test/unit/member_test.rb +++ b/test/unit/member_test.rb @@ -76,6 +76,15 @@ class MemberTest < ActiveSupport::TestCase assert !member.save end + def test_validate_member_role + user = User.new(:firstname => "new1", :lastname => "user1", :mail => "test_validate@somenet.foo") + user.login = "test_validate_member_role" + user.password, user.password_confirmation = "password", "password" + assert user.save + member = Member.new(:project_id => 1, :user_id => user.id, :role_ids => [5]) + assert !member.save + end + def test_destroy category1 = IssueCategory.find(1) assert_equal @jsmith.user.id, category1.assigned_to_id |