提交 b2b559c7 编写于 作者: R Ryuta Kamizono

Fix CI failure due to remaining tagging records

`TRUNCATE TABLE posts` also resets `AUTO_INCREMENT`. If newly created a
post, it is wrongly associated with remaining tagging records.
To un-associate remaining tagging record, use `post.create_tagging!`
instead.

Fixes #35751.
上级 5883a720
......@@ -21,7 +21,7 @@ def setup
ActiveRecord::Base.store_full_sti_class = store_full_sti_class
post = Namespaced::Post.create(title: "Great stuff", body: "This is not", author_id: 1)
@tagging = Tagging.create(taggable: post)
@tagging = post.create_tagging!
end
def teardown
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册