lib/decidim/debates/test/factories.rb in decidim-debates-0.14.4 vs lib/decidim/debates/test/factories.rb in decidim-debates-0.15.0

- old
+ new

@@ -1,15 +1,16 @@ # frozen_string_literal: true FactoryBot.define do factory :debate, class: "Decidim::Debates::Debate" do - title { Decidim::Faker::Localized.sentence(3) } - description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } } - information_updates { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } } - instructions { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } } + title { generate_localized_title } + description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } } + information_updates { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } } + instructions { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } } start_time { 1.day.from_now } end_time { start_time.advance(hours: 2) } component { build(:component, manifest_name: "debates") } + author { component.try(:organization) } trait :open_ama do start_time { 1.day.ago } end_time { 1.day.from_now } end