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:
parent
28f0c4f131
commit
9817e1d744
|
@ -154,4 +154,12 @@ class WatcherTest < ActiveSupport::TestCase
|
||||||
assert Issue.find(1).watched_by?(user)
|
assert Issue.find(1).watched_by?(user)
|
||||||
assert !Issue.find(4).watched_by?(user)
|
assert !Issue.find(4).watched_by?(user)
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Reference in New Issue