diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-03 16:40:42 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-03 16:40:42 +0000 |
commit | 7a5d6f61c773bf033bd7b7851ab9a0423965ddeb (patch) | |
tree | 54fc16a4dfa352ff2808e26c19c88a4c6a2f7dc0 /test/unit/member_test.rb | |
parent | 1337fcb3d99cc870b847f74f60bd7c230dfbf8c0 (diff) | |
download | redmine-7a5d6f61c773bf033bd7b7851ab9a0423965ddeb.tar.gz redmine-7a5d6f61c773bf033bd7b7851ab9a0423965ddeb.zip |
add test to check to set issue category assignee nil in destroying member
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8057 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/member_test.rb')
-rw-r--r-- | test/unit/member_test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/member_test.rb b/test/unit/member_test.rb index 4ef66e512..deb04d95b 100644 --- a/test/unit/member_test.rb +++ b/test/unit/member_test.rb @@ -77,13 +77,16 @@ class MemberTest < ActiveSupport::TestCase end def test_destroy + category1 = IssueCategory.find(1) + assert_equal @jsmith.user.id, category1.assigned_to_id assert_difference 'Member.count', -1 do assert_difference 'MemberRole.count', -1 do @jsmith.destroy end end - assert_raise(ActiveRecord::RecordNotFound) { Member.find(@jsmith.id) } + category1.reload + assert_nil category1.assigned_to_id end context "removing permissions" do |