Sha256: 83c5e3bb7e14335a8897732404e53ecf2eb77f30ea52e53fd6d7d2a76ecb58d1

Contents?: true

Size: 732 Bytes

Versions: 5

Compression:

Stored size: 732 Bytes

Contents

module Pageflow
  FactoryBot.define do
    factory :published_entry, class: PublishedEntry do
      transient do
        type_name { 'paged' }
        revision_attributes { {} }

        with_feature { nil }
        without_feature { nil }
      end

      initialize_with do
        PublishedEntry.new(create(:entry,
                                  :published,
                                  type_name: type_name,
                                  published_revision_attributes: revision_attributes,
                                  with_feature: with_feature,
                                  without_feature: without_feature))
      end

      to_create { |published_entry| published_entry.entry.save! }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pageflow-15.6.1 spec/factories/published_entries.rb
pageflow-15.6.0 spec/factories/published_entries.rb
pageflow-15.5.0 spec/factories/published_entries.rb
pageflow-15.4.0 spec/factories/published_entries.rb
pageflow-15.3.0 spec/factories/published_entries.rb