lib/decidim/meetings/component.rb in decidim-meetings-0.27.0.rc1 vs lib/decidim/meetings/component.rb in decidim-meetings-0.27.0.rc2

- old
+ new

@@ -125,11 +125,11 @@ scopes = participatory_space.organization.scopes global = nil end 2.times do - start_time = [rand(1..20).weeks.from_now, rand(1..20).weeks.ago].sample + start_time = Faker::Date.between(from: 20.weeks.ago, to: 20.weeks.from_now) end_time = start_time + [rand(1..4).hours, rand(1..20).days].sample params = { component: component, scope: Faker::Boolean.boolean(true_ratio: 0.5) ? global : scopes.sample, category: participatory_space.categories.sample, @@ -280,10 +280,10 @@ if author.is_a?(Decidim::UserGroup) user_group = author author = user_group.users.sample end - start_time = [rand(1..20).weeks.from_now, rand(1..20).weeks.ago].sample + start_time = Faker::Date.between(from: 20.weeks.ago, to: 20.weeks.from_now) params = { component: component, scope: Faker::Boolean.boolean(true_ratio: 0.5) ? global : scopes.sample, category: participatory_space.categories.sample, title: Decidim::Faker::Localized.sentence(word_count: 2),