Sha256: 54d22ebf7cc82bd1abcf5bef4f998351efb4db62595bd291ba6c0c0e4020ef3f

Contents?: true

Size: 636 Bytes

Versions: 41

Compression:

Stored size: 636 Bytes

Contents

# frozen_string_literal: true

require "decidim/core/test/factories"
require "decidim/forms/test/factories"
require "decidim/participatory_processes/test/factories"

FactoryBot.define do
  factory :surveys_component, parent: :component do
    name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :surveys).i18n_name }
    manifest_name { :surveys }
    participatory_space { create(:participatory_process, :with_steps) }
  end

  factory :survey, class: "Decidim::Surveys::Survey" do
    questionnaire { build(:questionnaire, :with_questions) }
    component { build(:surveys_component) }
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
decidim-surveys-0.23.0 lib/decidim/surveys/test/factories.rb