Sha256: e20090fee14517d7a8c7438c603ef07571b0f752e2e2b08970d695a3c21f61e6
Contents?: true
Size: 1.42 KB
Versions: 9
Compression:
Stored size: 1.42 KB
Contents
# frozen_string_literal: true require "decidim/core/test/factories" require "decidim/proposals/test/factories" FactoryBot.define do factory :awesome_config, class: "Decidim::DecidimAwesome::AwesomeConfig" do var { Faker::Hacker.noun } value { Decidim::DecidimAwesome.config.to_a.sample(1).to_h } organization { create :organization } end factory :config_constraint, class: "Decidim::DecidimAwesome::ConfigConstraint" do settings { { Faker::Hacker.noun => Faker::Hacker.noun } } awesome_config { create :awesome_config } end factory :editor_image, class: "Decidim::DecidimAwesome::EditorImage" do image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } path { Faker::Internet.url(host: "", scheme: "") } author { create :user } organization { create :organization } end factory :map_component, parent: :component do name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :proposals).i18n_name } manifest_name { :awesome_map } participatory_space { create(:participatory_process, :with_steps, organization: organization) } end factory :iframe_component, parent: :component do name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :proposals).i18n_name } manifest_name { :awesome_iframe } participatory_space { create(:participatory_process, :with_steps, organization: organization) } end end
Version data entries
9 entries across 9 versions & 1 rubygems