Sha256: 27594ee8858fb8ba998ce83f7e903086b6c1cfaab05911a6a60268d767554c5a

Contents?: true

Size: 356 Bytes

Versions: 6

Compression:

Stored size: 356 Bytes

Contents

# frozen_string_literal: true

##
# Use for generic Resources, with Hyrax assumptions.
FactoryBot.define do
  factory :hyrax_resource, class: "Hyrax::Resource" do
    trait :under_embargo do
      embargo_id { FactoryBot.create(:hyrax_embargo).id }
    end

    trait :under_lease do
      lease_id { FactoryBot.create(:hyrax_lease).id }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hyrax-5.0.4 lib/hyrax/specs/shared_specs/factories/hyrax_resource.rb
hyrax-5.0.3 lib/hyrax/specs/shared_specs/factories/hyrax_resource.rb
hyrax-5.0.2 lib/hyrax/specs/shared_specs/factories/hyrax_resource.rb
hyrax-5.0.1 lib/hyrax/specs/shared_specs/factories/hyrax_resource.rb
hyrax-5.0.0 spec/factories/hyrax_resource.rb
hyrax-5.0.0.rc3 spec/factories/hyrax_resource.rb