Sha256: 3c9bac41812ed9b27850610423724c07b13f384fa0d5cf55e1d2290e36fed5de
Contents?: true
Size: 826 Bytes
Versions: 1
Compression:
Stored size: 826 Bytes
Contents
require 'spec_helper' describe CurationConcerns::CreateDerivativesJob do before do @ffmpeg_enabled = CurationConcerns.config.enable_ffmpeg CurationConcerns.config.enable_ffmpeg = true allow(ActiveFedora::Base).to receive(:find).with('123').and_return(file_set) allow(file_set).to receive(:mime_type).and_return('audio/x-wav') allow(file_set).to receive(:id).and_return('123') end let(:file_set) { FileSet.new } after do CurationConcerns.config.enable_ffmpeg = @ffmpeg_enabled end context "with a file name" do it 'calls create_derivatives and save on a file set' do expect(Hydra::Derivatives::AudioDerivatives).to receive(:create) expect(file_set).to receive(:update_index) CreateDerivativesJob.perform_now('123', 'spec/fixtures/piano_note.wav') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
curation_concerns-0.2.0 | spec/jobs/create_derivatives_job_spec.rb |