Skip to content

Commit

Permalink
move over one more lease related change from #6098
Browse files Browse the repository at this point in the history
  • Loading branch information
alishaevn committed Jul 14, 2023
1 parent 6cc1544 commit a905be9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/factories/hyrax_lease.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# frozen_string_literal: true
FactoryBot.define do
factory :hyrax_lease, class: "Hyrax::Lease" do
lease_expiration_date { Time.zone.today + 10 }
lease_expiration_date { (Time.zone.today + 10).to_s }
visibility_after_lease { 'authenticated' }
visibility_during_lease { 'open' }

to_create do |instance|
Valkyrie.config.metadata_adapter.persister.save(resource: instance)
saved_instance = Valkyrie.config.metadata_adapter.persister.save(resource: instance)
instance.id = saved_instance.id
saved_instance
end

trait :expired do
Expand Down

0 comments on commit a905be9

Please sign in to comment.