[#800 #801] Test that non-member watchers aren't removed if they still have access

This commit is contained in:
Eric Davis 2010-12-03 13:38:14 -08:00
parent df5b2198e9
commit 111c7f47f7
1 changed files with 9 additions and 0 deletions

View File

@ -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