Sha256: 9529d98b78424f9356f3477fcc52a987c15b72921329a6b9abfbeb5ff9ff150d

Contents?: true

Size: 859 Bytes

Versions: 4

Compression:

Stored size: 859 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
    transient do
      skip_injection { false }
    end
    name { generate_component_name(participatory_space.organization.available_locales, :surveys, skip_injection: skip_injection) }
    manifest_name { :surveys }
    participatory_space { create(:participatory_process, :with_steps, skip_injection: skip_injection) }
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-surveys-0.27.9 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.27.8 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.27.7 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.27.6 lib/decidim/surveys/test/factories.rb