summaryrefslogtreecommitdiffstats
path: root/test/unit/watcher_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-12-04 09:44:11 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-12-04 09:44:11 +0000
commit93603f383aca6eb75d3d6ce8b2892a6eaa4e13ac (patch)
treec1a7093975e5b5d43e2f7c32d0d99a7dd05fa906 /test/unit/watcher_test.rb
parent32ed138c532970c24d11d9ad8589599cadc84470 (diff)
downloadredmine-93603f383aca6eb75d3d6ce8b2892a6eaa4e13ac.tar.gz
redmine-93603f383aca6eb75d3d6ce8b2892a6eaa4e13ac.zip
add unit test to validate watcher
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8071 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/watcher_test.rb')
-rw-r--r--test/unit/watcher_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/watcher_test.rb b/test/unit/watcher_test.rb
index 7c2f85742..35651179e 100644
--- a/test/unit/watcher_test.rb
+++ b/test/unit/watcher_test.rb
@@ -29,6 +29,13 @@ class WatcherTest < ActiveSupport::TestCase
@issue = Issue.find(1)
end
+ def test_validate
+ user = User.find(5)
+ assert !user.active?
+ watcher = Watcher.new(:user_id => user.id)
+ assert !watcher.save
+ end
+
def test_watch
assert @issue.add_watcher(@user)
@issue.reload