Sha256: 26064b839289764c7407ab2deb83b8d41cb2d457a2df7289c45414297898f2d7

Contents?: true

Size: 582 Bytes

Versions: 84

Compression:

Stored size: 582 Bytes

Contents

FactoryGirl.define do
  factory :version, class: Pulitzer::Version do
    status { Pulitzer::Version.statuses[:preview] }
    association :post

    trait :with_content_elements do
      after(:create) do |version|
        create_list(:content_element, 3, version_id: version.id)
      end
    end

    trait :with_free_form_sections do
      after(:create) do |version|
        version.free_form_sections.create(name: 'section A')
        version.free_form_sections.create(name: 'section B')
        version.free_form_sections.create(name: 'section C')
      end
    end
  end
end

Version data entries

84 entries across 84 versions & 1 rubygems

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