A platform for community discussion. Free, open, simple.
DEV: Fix `fabricator` deprecations (#17658)
Jarek Radosz23a267c75d7c
diff --git a/spec/fabricators/category_fabricator.rb b/spec/fabricators/category_fabricator.rbindex 06563200b30..5ffeff164e7 100644--- a/spec/fabricators/category_fabricator.rb+++ b/spec/fabricators/category_fabricator.rb@@ -28,7 +28,7 @@ Fabricator(:private_category_with_definition, from: :private_category) doendFabricator(: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 }endFabricator(:mailinglist_mirror_category, from: :category) dodiff --git a/spec/fabricators/post_fabricator.rb b/spec/fabricators/post_fabricator.rbindex 9b3b5d85f1b..3a23e045c6b 100644--- a/spec/fabricators/post_fabricator.rb+++ b/spec/fabricators/post_fabricator.rb@@ -7,7 +7,7 @@ Fabricator(:post) dopost_type Post.types[:regular]# 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)endend