Sha256: c36e45a85503a0089336573dbc2598e821b6e7426295928ee467bf43eda31ee6

Contents?: true

Size: 658 Bytes

Versions: 31

Compression:

Stored size: 658 Bytes

Contents

FactoryGirl.define do
  factory :post_type_version, class: Pulitzer::PostTypeVersion do
    association :post_type
    
    trait :with_content_elements do
      after(:create) do |post_type_version|
        create_list(:post_type_content_element_type, 3, post_type_version_id: post_type_version.id)
      end
    end

    trait :with_free_form_sections do
      after(:create) do |post_type_version|
        post_type_version.free_form_section_types.create(name: 'Main Body')
        post_type_version.free_form_section_types.create(name: 'Side Bar')
        post_type_version.free_form_section_types.create(name: 'Footer List')
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
pulitzer-0.15.31 spec/factories/post_type_version.rb
pulitzer-0.15.30 spec/factories/post_type_version.rb
pulitzer-0.15.29 spec/factories/post_type_version.rb
pulitzer-0.15.28 spec/factories/post_type_version.rb
pulitzer-0.15.27 spec/factories/post_type_version.rb
pulitzer-0.15.26 spec/factories/post_type_version.rb
pulitzer-0.15.25 spec/factories/post_type_version.rb
pulitzer-0.15.24 spec/factories/post_type_version.rb
pulitzer-0.15.23 spec/factories/post_type_version.rb
pulitzer-0.15.22 spec/factories/post_type_version.rb
pulitzer-0.15.21 spec/factories/post_type_version.rb
pulitzer-0.15.20 spec/factories/post_type_version.rb
pulitzer-0.15.19 spec/factories/post_type_version.rb
pulitzer-0.15.18 spec/factories/post_type_version.rb
pulitzer-0.15.17 spec/factories/post_type_version.rb
pulitzer-0.15.16 spec/factories/post_type_version.rb
pulitzer-0.15.15 spec/factories/post_type_version.rb
pulitzer-0.15.14 spec/factories/post_type_version.rb
pulitzer-0.15.13 spec/factories/post_type_version.rb
pulitzer-0.15.12 spec/factories/post_type_version.rb