Additional test for Watcher.prune.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9418 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-04-15 15:13:28 +00:00
parent 28f0c4f131
commit 9817e1d744
1 changed files with 8 additions and 0 deletions

View File

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