From 111c7f47f7a6ec9b2703fd52e7e1bdf9a26f54c3 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Fri, 3 Dec 2010 13:38:14 -0800 Subject: [PATCH] [#800 #801] Test that non-member watchers aren't removed if they still have access --- test/unit/member_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) 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