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:
parent
32ed138c53
commit
93603f383a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue