##// END OF EJS Templates
add test to check to set issue category assignee nil in destroying member...
Toshi MARUYAMA -
r7937:7a5d6f61c773
parent child
Show More
@@ -77,13 +77,16 class MemberTest < ActiveSupport::TestCase
77 end
77 end
78
78
79 def test_destroy
79 def test_destroy
80 category1 = IssueCategory.find(1)
81 assert_equal @jsmith.user.id, category1.assigned_to_id
80 assert_difference 'Member.count', -1 do
82 assert_difference 'Member.count', -1 do
81 assert_difference 'MemberRole.count', -1 do
83 assert_difference 'MemberRole.count', -1 do
82 @jsmith.destroy
84 @jsmith.destroy
83 end
85 end
84 end
86 end
85
86 assert_raise(ActiveRecord::RecordNotFound) { Member.find(@jsmith.id) }
87 assert_raise(ActiveRecord::RecordNotFound) { Member.find(@jsmith.id) }
88 category1.reload
89 assert_nil category1.assigned_to_id
87 end
90 end
88
91
89 context "removing permissions" do
92 context "removing permissions" do
General Comments 0
You need to be logged in to leave comments. Login now