lib/decidim/accountability/test/factories.rb in decidim-accountability-0.14.4 vs lib/decidim/accountability/test/factories.rb in decidim-accountability-0.15.0
- old
+ new
@@ -11,11 +11,11 @@
name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :accountability).i18n_name }
manifest_name { :accountability }
participatory_space { create(:participatory_process, :with_steps, organization: organization) }
settings do
{
- intro: Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) },
+ intro: Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title },
categories_label: Decidim::Faker::Localized.word,
subcategories_label: Decidim::Faker::Localized.word,
heading_parent_level_results: Decidim::Faker::Localized.word,
heading_leaf_level_results: Decidim::Faker::Localized.word
}
@@ -24,25 +24,25 @@
factory :status, class: "Decidim::Accountability::Status" do
component { create(:accountability_component) }
sequence(:key) { |n| "status_#{n}" }
name { Decidim::Faker::Localized.word }
- description { Decidim::Faker::Localized.sentence(3) }
+ description { generate_localized_title }
progress { rand(1..100) }
end
factory :result, class: "Decidim::Accountability::Result" do
component { create(:accountability_component) }
- title { Decidim::Faker::Localized.sentence(3) }
- description { 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 } }
start_date { "12/7/2017" }
end_date { "30/9/2017" }
status { create :status, component: component }
progress { rand(1..100) }
end
factory :timeline_entry, class: "Decidim::Accountability::TimelineEntry" do
result { create(:result) }
entry_date { "12/7/2017" }
- description { Decidim::Faker::Localized.sentence(2) }
+ description { generate_localized_title }
end
end