Sha256: f3fce60be9d085fcbd79bc6da9e5c425918047c9fa9b510dd2078000369a4d7a

Contents?: true

Size: 432 Bytes

Versions: 4

Compression:

Stored size: 432 Bytes

Contents

# frozen_string_literal: true
FactoryBot.define do
  factory :sipity_entity, class: Sipity::Entity do
    transient do
      proxy_for { nil }
    end

    proxy_for_global_id { 'gid://internal/Mock/1' }
    workflow { workflow_state.workflow }
    workflow_state

    after(:build) do |entity, evaluator|
      entity.proxy_for_global_id = Hyrax::GlobalID(evaluator.proxy_for).to_s if
        evaluator.proxy_for
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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