Sha256: daf78dbd21a2160c35f1d792845e4eaabe8593fc6066c18e8de992fa0abd9c62

Contents?: true

Size: 409 Bytes

Versions: 7

Compression:

Stored size: 409 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :field, class: "Archangel::Field" do
    collection
    sequence(:label) { |n| "Field #{n} Label" }
    sequence(:slug) { |n| "field-#{n}" }
    value "Field default value"
    classification "string"
    required false

    trait :required do
      required true
    end

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
archangel-0.0.8 lib/archangel/testing_support/factories/archangel_fields.rb
archangel-0.0.7 lib/archangel/testing_support/factories/archangel_fields.rb
archangel-0.0.6 lib/archangel/testing_support/factories/archangel_fields.rb
archangel-0.0.5 lib/archangel/testing_support/factories/archangel_fields.rb
archangel-0.0.4 lib/archangel/testing_support/factories/archangel_fields.rb
archangel-0.0.3 lib/archangel/testing_support/factories/archangel_fields.rb
archangel-0.0.2 lib/archangel/testing_support/factories/archangel_fields.rb