Sha256: a806d428d9323b70ab2778c2602aa23da5368155c68951ee6bcab27f0e0ac162

Contents?: true

Size: 834 Bytes

Versions: 10

Compression:

Stored size: 834 Bytes

Contents

# frozen_string_literal: true

require "decidim/components/namer"
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:) }
    manifest_name { :surveys }
    participatory_space { create(:participatory_process, :with_steps, skip_injection:) }
  end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-surveys-0.29.1 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.28.4 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.29.0 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.28.3 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.29.0.rc4 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.29.0.rc3 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.29.0.rc2 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.29.0.rc1 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.28.2 lib/decidim/surveys/test/factories.rb
decidim-surveys-0.28.1 lib/decidim/surveys/test/factories.rb