Sha256: 02882852bdb96064eda81f3e15eaa6007a3887bc92419f2c240cef58fcfaad81

Contents?: true

Size: 825 Bytes

Versions: 4

Compression:

Stored size: 825 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :reporting_proposals_component, parent: :proposal_component do
    name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :reporting_proposals).i18n_name }
    manifest_name { :reporting_proposals }
  end

  factory :category_valuator, class: "Decidim::ReportingProposals::CategoryValuator" do
    category { create :category, participatory_space: valuator_role.participatory_space }
    valuator_role { create :participatory_process_user_role, role: "valuator" }
  end
end

FactoryBot.modify do
  factory :template, class: "Decidim::Templates::Template" do
    trait :proposal_answer do
      templatable { organization }
      target { :proposal_answer }
      field_values { { internal_state: :accepted } }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-reporting_proposals-0.5.2 lib/decidim/reporting_proposals/test/factories.rb
decidim-reporting_proposals-0.5.1 lib/decidim/reporting_proposals/test/factories.rb
decidim-reporting_proposals-0.5.0 lib/decidim/reporting_proposals/test/factories.rb
decidim-reporting_proposals-0.4.2 lib/decidim/reporting_proposals/test/factories.rb