diff options
author | Go MAEDA <maeda@farend.jp> | 2023-10-15 01:31:29 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-10-15 01:31:29 +0000 |
commit | 26c392d3c368af689df8c0c95863e3e0298d462a (patch) | |
tree | 40756cd4b0ee5f803eeda1e5220248ec48b96a74 | |
parent | 1a1ea183071295ab2bf7d957513be613de5059bd (diff) | |
download | redmine-26c392d3c368af689df8c0c95863e3e0298d462a.tar.gz redmine-26c392d3c368af689df8c0c95863e3e0298d462a.zip |
Fix a test failure due to the auto watch on issue creation (#38238).
Patch by Go MAEDA.
git-svn-id: https://svn.redmine.org/redmine/trunk@22342 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/unit/watcher_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/watcher_test.rb b/test/unit/watcher_test.rb index 1e95be2f6..ced499712 100644 --- a/test/unit/watcher_test.rb +++ b/test/unit/watcher_test.rb @@ -110,7 +110,9 @@ class WatcherTest < ActiveSupport::TestCase end def test_watcher_user_ids_should_make_ids_uniq - issue = Issue.new(:project => Project.find(1), :tracker_id => 1, :subject => "test", :author => User.find(2)) + author = User.find(2) + author.pref.auto_watch_on = [] + issue = Issue.new(:project => Project.find(1), :tracker_id => 1, :subject => "test", :author => author) issue.watcher_user_ids = ['1', '3', '1'] issue.save! assert_equal 2, issue.watchers.count |