From 7a5d6f61c773bf033bd7b7851ab9a0423965ddeb Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 3 Dec 2011 16:40:42 +0000 Subject: [PATCH] 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 --- test/unit/member_test.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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