1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-23 20:11:45 +00:00

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
This commit is contained in:
Go MAEDA 2023-10-15 01:31:29 +00:00
parent 1a1ea18307
commit 26c392d3c3

View File

@ -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