summaryrefslogtreecommitdiffstats
path: root/test/unit/project_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-04-01 14:48:50 +0000
committerGo MAEDA <maeda@farend.jp>2021-04-01 14:48:50 +0000
commite86476eb5be8abbabba60e0c9a34f4a50fafcfb9 (patch)
tree387b00490db631ccd077e621cb364c4f41c4fb09 /test/unit/project_test.rb
parentf1b1c2f4712e089d9a00310f24d54c672f707235 (diff)
downloadredmine-e86476eb5be8abbabba60e0c9a34f4a50fafcfb9.tar.gz
redmine-e86476eb5be8abbabba60e0c9a34f4a50fafcfb9.zip
Fix "ActiveRecord::StaleObjectError: Attempted to update a stale object: Issue." (#29914, #32912).
Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@20884 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r--test/unit/project_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index f15fc937a..b154e6b90 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -245,7 +245,7 @@ class ProjectTest < ActiveSupport::TestCase
def test_destroy_should_destroy_subtasks
issues =
(0..2).to_a.map do
- Issue.create!(:project_id => 1, :tracker_id => 1,
+ Issue.generate!(:project_id => 1, :tracker_id => 1,
:author_id => 1, :subject => 'test')
end
issues[0].update! :parent_issue_id => issues[1].id