Sha256: 22083740e27d609fb5b10554f7a97e1ea9ce9ee66ccb3532aec9253ae8441005
Contents?: true
Size: 737 Bytes
Versions: 14
Compression:
Stored size: 737 Bytes
Contents
# frozen_string_literal: true require "decidim/faker/localized" require "decidim/dev" FactoryBot.define do factory :template, class: "Decidim::Templates::Template" do organization templatable { build(:dummy_resource) } name { Decidim::Faker::Localized.sentence } ## Questionnaire templates factory :questionnaire_template do trait :with_questions do after(:create) do |template| template.templatable = create(:questionnaire, :with_questions, questionnaire_for: template) template.save! end end after(:create) do |template| template.templatable = create(:questionnaire, questionnaire_for: template) template.save! end end end end
Version data entries
14 entries across 14 versions & 1 rubygems