lib/decidim/plans/test/factories.rb in decidim-plans-0.16.0 vs lib/decidim/plans/test/factories.rb in decidim-plans-0.16.1

- old
+ new

@@ -39,14 +39,14 @@ attachments_allowed: true } end end - trait :with_single_language_answers do + trait :with_multilingual_answers do settings do { - multilingual_answers: false + multilingual_answers: true } end end end @@ -85,9 +85,16 @@ published_at { Time.current } end trait :unpublished do published_at { nil } + end + + trait :official do + after :build do |plan| + plan.coauthorships.clear + plan.coauthorships.build(author: plan.organization) + end end trait :evaluating do state { "evaluating" } answered_at { Time.current }