diff options
Diffstat (limited to 'test/unit/watcher_test.rb')
-rw-r--r-- | test/unit/watcher_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |