lib/decidim/comments/test/factories.rb in decidim-comments-0.28.1 vs lib/decidim/comments/test/factories.rb in decidim-comments-0.28.2
- old
+ new
@@ -38,9 +38,15 @@
skip_injection:
)
end
root_commentable { build(:dummy_resource, skip_injection:) }
end
+
+ trait :moderated do
+ after(:create) do |comment, evaluator|
+ create(:moderation, reportable: comment, hidden_at: 2.days.ago, skip_injection: evaluator.skip_injection)
+ end
+ end
end
factory :comment_vote, class: "Decidim::Comments::CommentVote" do
transient do
skip_injection { false }