Skip to content

Commit

Permalink
Merge pull request #6478 from samvera/updates_file_sets_controller_spec
Browse files Browse the repository at this point in the history
Enqueues Job that wasn't calling.
  • Loading branch information
dlpierce authored Nov 30, 2023
2 parents 47102a3 + c4ea200 commit 7ef145e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/controllers/hyrax/file_sets_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@
end
end

describe "with valkyrie", if: ::FileSet < Hyrax::Resource do
describe "with valkyrie", :clean_repo, if: ::FileSet < Hyrax::Resource do
context "when signed in" do
let(:user) { FactoryBot.create(:user) }
before { sign_in user }
Expand Down Expand Up @@ -637,7 +637,7 @@

context "when updating the attached file already uploaded" do
let(:versions) { Hyrax::VersioningService.new(resource: file_metadata).versions }
it "spawns a ContentNewVersionEventJob", perform_enqueued: [ValkyrieIngestJob] do
it "spawns a ContentNewVersionEventJob", perform_enqueued: [ValkyrieIngestJob, ValkyrieCharacterizationJob] do
expect(ContentNewVersionEventJob).to receive(:perform_later)
new_file = FactoryBot.create(:uploaded_file, user: user, file: File.open("spec/fixtures/4-20.png"))

Expand All @@ -650,7 +650,7 @@

expect(Hyrax::VersionCommitter.where(version_id: versions.last.version_id).pluck(:committer_login))
.to eq [user.user_key]
expect(Hyrax.config.characterization_service).to have_received(:run).exactly(2).times
expect(Hyrax.config.characterization_service).to have_received(:run).exactly(1).times
# TODO: Make this pass. Store a history of original_filenames as a
# serialized JSON blob on FileMetadata.
# reloaded_metadata = Hyrax.query_service.find_by(id: file_metadata.id)
Expand Down

0 comments on commit 7ef145e

Please sign in to comment.