Sha256: 0e900d010de97537fe9430e6d2603118f747b5d03aa15f0e00fd008df94d18cf

Contents?: true

Size: 437 Bytes

Versions: 1

Compression:

Stored size: 437 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :widget, class: "Archangel::Widget" do
    site
    template { nil }
    sequence(:name) { |n| "Widget #{n}" }
    sequence(:slug) { |n| "widget-#{n}" }
    content { "<p>Content of the widget</p>" }

    trait :with_template do
      association :template, factory: :template, partial: true
    end

    trait :deleted do
      deleted_at { Time.current }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
archangel-0.3.0 lib/archangel/testing_support/factories/archangel_widgets.rb