Create Legislation::PeopleProposal model

This commit is contained in:
lalo
2019-05-09 12:28:59 +02:00
committed by voodoorai2000
parent 3284a0848a
commit 46e5d6a9fa
13 changed files with 445 additions and 14 deletions

View File

@@ -0,0 +1,13 @@
section "Creating legislation people proposals" do
10.times do
Legislation::PeopleProposal.create!(title: Faker::Lorem.sentence(3).truncate(60),
description: Faker::Lorem.paragraphs.join("\n\n"),
question: Faker::Lorem.sentence(3),
summary: Faker::Lorem.paragraph,
author: User.all.sample,
process: Legislation::Process.all.sample,
terms_of_service: "1",
validated: rand <= 2.0 / 3,
selected: rand <= 1.0 / 3)
end
end

View File

@@ -11,6 +11,8 @@ section "Creating collaborative legislation" do
debate_end_date: Date.current + (i - 5).days,
proposals_phase_start_date: Date.current + (i - 7).days,
proposals_phase_end_date: Date.current + (i - 5).days,
people_proposals_phase_start_date: Date.current + (i - 7).days,
people_proposals_phase_end_date: Date.current + (i - 5).days,
draft_publication_date: Date.current + (i - 3).days,
allegations_start_date: Date.current + (i - 2).days,
allegations_end_date: Date.current + (i - 1).days,
@@ -20,6 +22,7 @@ section "Creating collaborative legislation" do
draft_publication_enabled: true,
result_publication_enabled: true,
proposals_phase_enabled: true,
people_proposals_phase_enabled: true,
published: true)
end