mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 13:03:39 +08:00
DEV: Fix fabricator
deprecations (#17658)
This commit is contained in:
parent
59686c1cb8
commit
23a267c75d
|
@ -28,7 +28,7 @@ Fabricator(:private_category_with_definition, from: :private_category) do
|
||||||
end
|
end
|
||||||
|
|
||||||
Fabricator(:link_category, from: :category) do
|
Fabricator(:link_category, from: :category) do
|
||||||
before_validation { |category, transients| category.topic_featured_link_allowed = true }
|
before_create { |category, transients| category.topic_featured_link_allowed = true }
|
||||||
end
|
end
|
||||||
|
|
||||||
Fabricator(:mailinglist_mirror_category, from: :category) do
|
Fabricator(:mailinglist_mirror_category, from: :category) do
|
||||||
|
|
|
@ -7,7 +7,7 @@ Fabricator(:post) do
|
||||||
post_type Post.types[:regular]
|
post_type Post.types[:regular]
|
||||||
|
|
||||||
# Fabrication bypasses PostCreator, for performance reasons, where the counts are updated so we have to handle this manually here.
|
# Fabrication bypasses PostCreator, for performance reasons, where the counts are updated so we have to handle this manually here.
|
||||||
after_save do |post, _transients|
|
after_create do |post, _transients|
|
||||||
UserStatCountUpdater.increment!(post)
|
UserStatCountUpdater.increment!(post)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user