summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-30 11:02:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-30 11:02:27 +0000
commita00d1eabd7c47ad93cbcffc7eb6d6b7ed7f0f3f0 (patch)
treecf22301545900d3e9a5ca1605b03e7ec44256e3a /test/unit
parente5180884c1e51e5751e7c7a7b1b44a5c25b934b7 (diff)
downloadredmine-a00d1eabd7c47ad93cbcffc7eb6d6b7ed7f0f3f0.tar.gz
redmine-a00d1eabd7c47ad93cbcffc7eb6d6b7ed7f0f3f0.zip
Fixed: watchers selection lost when issue creation fails (#5406). #watched_by? was fixed in order to work with #watcher_user_ids= used in controllers on unsaved objects.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3705 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/watcher_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/watcher_test.rb b/test/unit/watcher_test.rb
index db73f8ccc..d0fe588bf 100644
--- a/test/unit/watcher_test.rb
+++ b/test/unit/watcher_test.rb
@@ -47,6 +47,12 @@ class WatcherTest < ActiveSupport::TestCase
assert Issue.watched_by(@user).include?(@issue)
end
+ def test_watcher_user_ids
+ issue = Issue.new
+ issue.watcher_user_ids = ['1', '3']
+ assert issue.watched_by?(User.find(1))
+ end
+
def test_recipients
@issue.watchers.delete_all
@issue.reload