Sha256: fc6eab3982e8022fe7b7d541c9efaeee5ea747b8e0119f144170efcea3475220
Contents?: true
Size: 854 Bytes
Versions: 30
Compression:
Stored size: 854 Bytes
Contents
# frozen_string_literal: true require "factory_bot" require "alchemy/test_support/factories/page_factory" FactoryBot.define do factory :alchemy_element, class: "Alchemy::Element" do name { "article" } autogenerate_contents { false } association :page, factory: :alchemy_page trait :fixed do fixed { true } name { "right_column" } end trait :unique do unique { true } name { "header" } end trait :trashed do after(:create) do |element| element.update_column(:position, :null) end end trait :with_nestable_elements do name { "slider" } end trait :nested do association :parent_element, factory: :alchemy_element, name: "slider" name { "slide" } end trait :with_contents do autogenerate_contents { true } end end end
Version data entries
30 entries across 30 versions & 1 rubygems