Sha256: ea6a54ce737ec414305c7c6f6784cb1f59e0fc398d585ad0987c93ddfb31b213

Contents?: true

Size: 426 Bytes

Versions: 7

Compression:

Stored size: 426 Bytes

Contents

require 'factory_bot'

FactoryBot.define do
  factory :alchemy_element, class: 'Alchemy::Element' do
    name 'article'
    create_contents_after_create false
    association :page, factory: :alchemy_page

    trait :unique do
      unique true
      name 'header'
    end

    trait :with_nestable_elements do
      name 'slider'
    end

    trait :with_contents do
      create_contents_after_create true
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
alchemy_cms-4.0.6 lib/alchemy/test_support/factories/element_factory.rb
alchemy_cms-4.0.5 lib/alchemy/test_support/factories/element_factory.rb
alchemy_cms-4.0.4 lib/alchemy/test_support/factories/element_factory.rb
alchemy_cms-4.0.3 lib/alchemy/test_support/factories/element_factory.rb
alchemy_cms-4.0.2 lib/alchemy/test_support/factories/element_factory.rb
alchemy_cms-4.0.1 lib/alchemy/test_support/factories/element_factory.rb
alchemy_cms-4.0.0 lib/alchemy/test_support/factories/element_factory.rb