Skip to content

Commit

Permalink
Update spec to match use of enqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpierce authored and jeremyf committed Feb 8, 2024
1 parent 6d14314 commit 2c8bd01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/jobs/attach_files_to_work_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@
shared_examples 'a file attacher', perform_enqueued: [described_class, IngestJob] do
it 'attaches files, copies visibility and permissions and updates the uploaded files' do
id = generic_work.id
expect(ValkyrieIngestJob).to receive(:perform_later).twice
described_class.perform_now(generic_work, [uploaded_file1, uploaded_file2])
generic_work = Hyrax.query_service.find_by(id: id)
file_sets = Hyrax.custom_queries.find_child_file_sets(resource: generic_work)
expect(file_sets.count).to eq 2
expect(file_sets.map(&:visibility)).to all(eq 'open')
expect(uploaded_file1.reload.file_set_uri).not_to be_nil
expect(ImportUrlJob).not_to have_been_enqueued
expect(ValkyrieIngestJob).to have_been_enqueued.twice
end
end

Expand Down

0 comments on commit 2c8bd01

Please sign in to comment.