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
This commit is contained in:
parent
1337fcb3d9
commit
7a5d6f61c7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue