Sha256: af5795c0e30b4ef6bd6b9f89828bd6f6f05fa5e3e54751d9f01020cbf8772886

Contents?: true

Size: 667 Bytes

Versions: 66

Compression:

Stored size: 667 Bytes

Contents

require 'spec_helper'

describe CurationConcerns::PersistDirectlyContainedOutputFileService do
  let(:object)            { FileSet.create! { |fs| fs.apply_depositor_metadata('justin') } }
  let(:file_path)         { File.join(fixture_path, 'test.tif') }
  let(:file)              { File.new(file_path) }
  let(:destination_name)  { 'the_derivative_name' }
  let(:stream) { StringIO.new("fake file content") }

  it "persists the file to the specified destination on the given object" do
    described_class.call(stream, format: 'txt', url: object.uri, container: 'extracted_text')
    expect(object.reload.extracted_text.content).to eq("fake file content")
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.7.7 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-2.0.0 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-2.0.0.rc2 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.7.6 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.7.5 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.7.4 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.7.3 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.7.2 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-2.0.0.rc1 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.7.1 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.7.0 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.7.0.beta1 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.6.3 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.6.2 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.6.1 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.6.0 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.5.0 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.4.0 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.3.3 spec/services/persist_directly_contained_output_file_service_spec.rb