mirror of
https://github.com/redmine/redmine.git
synced 2026-07-01 00:30:14 +02:00
add unit test to validate watcher
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8071 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user