Skip to content

Commit

Permalink
specs: fake characterization in ValkyriePersistDerivatives tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dunn committed Jul 6, 2022
1 parent 32487f4 commit 68b7a4b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/services/hyrax/valkyrie_persist_derivatives_spec.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# frozen_string_literal: true
RSpec.describe Hyrax::ValkyriePersistDerivatives do
let(:fits_response) { IO.read('spec/fixtures/png_fits.xml') }

before do
allow(Hyrax.config)
.to receive(:derivatives_path)
.and_return('/app/samvera/hyrax-webapp/derivatives/')

# stub out characterization to avoid system calls. It's important some
# amount of characterization happens so listeners fire.
allow(Hydra::FileCharacterization).to receive(:characterize).and_return(fits_response)
end

describe '.call' do
Expand Down

0 comments on commit 68b7a4b

Please sign in to comment.