Sha256: 437545ddf1edae77ae3ed60cf0a1af25b7c9e9c78053d42bacbbe5efc0721ab2

Contents?: true

Size: 434 Bytes

Versions: 105

Compression:

Stored size: 434 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :alchemy_node, class: "Alchemy::Node" do
    language { Alchemy::Language.default || create(:alchemy_language) }
    name { "A Node" }
    menu_type { Alchemy::Node.available_menu_names.first }

    trait :with_page do
      association :page, factory: :alchemy_page
      name { nil }
    end

    trait :with_url do
      url { "https://example.com" }
    end
  end
end

Version data entries

105 entries across 105 versions & 1 rubygems

Version Path
alchemy_cms-6.0.0.b2 lib/alchemy/test_support/factories/node_factory.rb
alchemy_cms-6.0.0.b1 lib/alchemy/test_support/factories/node_factory.rb
alchemy_cms-5.2.1 lib/alchemy/test_support/factories/node_factory.rb
alchemy_cms-5.2.0 lib/alchemy/test_support/factories/node_factory.rb
alchemy_cms-5.2.0.rc1 lib/alchemy/test_support/factories/node_factory.rb