From 9817e1d744eccc1f715564015cde80672906ba3e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 15 Apr 2012 15:13:28 +0000 Subject: [PATCH] Additional test for Watcher.prune. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9418 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/watcher_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/unit/watcher_test.rb b/test/unit/watcher_test.rb index 564cd0503..ed0400a7e 100644 --- a/test/unit/watcher_test.rb +++ b/test/unit/watcher_test.rb @@ -154,4 +154,12 @@ class WatcherTest < ActiveSupport::TestCase assert Issue.find(1).watched_by?(user) assert !Issue.find(4).watched_by?(user) end + + def test_prune_all + user = User.find(9) + Watcher.new(:watchable => Issue.find(4), :user => User.find(9)).save(false) + + assert Watcher.prune > 0 + assert !Issue.find(4).watched_by?(user) + end end -- 2.39.5