summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-15 15:13:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-15 15:13:28 +0000
commit9817e1d744eccc1f715564015cde80672906ba3e (patch)
tree8532fc0c7616676f2f11b948e959364ba10e11fb
parent28f0c4f131b02ab67bd9c254f9853168ec6a5b65 (diff)
downloadredmine-9817e1d744eccc1f715564015cde80672906ba3e.tar.gz
redmine-9817e1d744eccc1f715564015cde80672906ba3e.zip
Additional test for Watcher.prune.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9418 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/unit/watcher_test.rb8
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