Skip to content

Commit

Permalink
Merge pull request #6468 from samvera/abel-fix_featured_work_list_spec
Browse files Browse the repository at this point in the history
Valkyrization: Fix failing tests in featured_work_list_spec.rb
  • Loading branch information
dlpierce authored Nov 27, 2023
2 parents 5e41d39 + 1656e48 commit d4644a0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/models/featured_work_list_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# frozen_string_literal: true
RSpec.describe FeaturedWorkList, type: :model do
let(:work1) { create(:generic_work) }
let(:work2) { create(:generic_work) }
let(:user) { create(:user) }
let(:work1) { valkyrie_create(:hyrax_work) }
let(:work2) { valkyrie_create(:hyrax_work) }

describe 'featured_works' do
before do
Expand All @@ -17,9 +18,10 @@
end
end

context 'when one of the files is deleted' do
context 'when one of the works is deleted' do
before do
work1.destroy
transaction = Hyrax::Transactions::WorkDestroy.new
transaction.with_step_args('work_resource.delete_all_file_sets' => { user: user }).call(work1)
end

it 'is a list of the remaining featured work objects, each with the generic_work\'s solr_doc' do
Expand Down

0 comments on commit d4644a0

Please sign in to comment.