mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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.
This commit is contained in:
parent
5883a72092
commit
b2b559c75c
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ module PolymorphicFullStiClassNamesSharedTest
|
||||||
ActiveRecord::Base.store_full_sti_class = store_full_sti_class
|
ActiveRecord::Base.store_full_sti_class = store_full_sti_class
|
||||||
|
|
||||||
post = Namespaced::Post.create(title: "Great stuff", body: "This is not", author_id: 1)
|
post = Namespaced::Post.create(title: "Great stuff", body: "This is not", author_id: 1)
|
||||||
@tagging = Tagging.create(taggable: post)
|
@tagging = post.create_tagging!
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
|
|
Loading…
Reference in a new issue