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.3.2 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.3.1 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.3.0 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.2.0 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.1.2 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.1.1 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.1.0 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0.beta10 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0.beta9 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0.beta8 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0.beta7 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0.beta6 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0.beta5 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0.beta4 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0.beta3 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0.beta2 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-1.0.0.beta1 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-0.14.0 spec/services/persist_directly_contained_output_file_service_spec.rb
curation_concerns-0.14.0.pre4 spec/services/persist_directly_contained_output_file_service_spec.rb