diff --git a/test/unit/member_test.rb b/test/unit/member_test.rb index 43dd1a92..b2b16f9a 100644 --- a/test/unit/member_test.rb +++ b/test/unit/member_test.rb @@ -89,6 +89,15 @@ class MemberTest < ActiveSupport::TestCase @member.destroy end end + + should "not prune watchers if the user still has permission to watch as a non-member" do + @member_on_public_project = Member.create!(:project => Project.find(1), :principal => User.find(9), :role_ids => [1, 2]) + + assert_no_difference 'Watcher.count' do + @member_on_public_project.destroy + end + end + end context "by updating roles" do