summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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