Sha256: faf34762bacbe714720b0f8392140d98bf318542f02353cfaaebca80920a4c3a

Contents?: true

Size: 526 Bytes

Versions: 24

Compression:

Stored size: 526 Bytes

Contents

module FileSetHelper
  # Mocking out the Hydra::Works::FileSet sufficiently to add original_file
  # without a save to fedora. This works by mocking the response from ldp_source.head
  # so AF association believes subject is already saved.
  def mock_add_file_to_file_set(fs, file)
    allow(fs.ldp_source).to receive(:head).and_return(Faraday::Response.new)
    allow(file).to receive(:has_content?).and_return(true)
    fs.original_file = file
  end

  RSpec.configure do |config|
    config.include FileSetHelper
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
hydra-works-2.2.0 spec/support/file_set_helper.rb
hydra-works-2.1.0 spec/support/file_set_helper.rb
hydra-works-2.0.0 spec/support/file_set_helper.rb
hydra-works-1.2.0 spec/support/file_set_helper.rb
hydra-works-1.1.0 spec/support/file_set_helper.rb
hydra-works-1.0.0 spec/support/file_set_helper.rb
hydra-works-0.17.0 spec/support/file_set_helper.rb
hydra-works-0.16.0 spec/support/file_set_helper.rb
hydra-works-0.15.0 spec/support/file_set_helper.rb
hydra-works-0.12.1 spec/support/file_set_helper.rb
hydra-works-0.14.0 spec/support/file_set_helper.rb
hydra-works-0.13.0 spec/support/file_set_helper.rb
hydra-works-0.12.0 spec/support/file_set_helper.rb
hydra-works-0.11.0 spec/support/file_set_helper.rb
hydra-works-0.10.0 spec/support/file_set_helper.rb
hydra-works-0.9.0 spec/support/file_set_helper.rb
hydra-works-0.8.1 spec/support/file_set_helper.rb
hydra-works-0.8 spec/support/file_set_helper.rb
hydra-works-0.7.1 spec/support/file_set_helper.rb
hydra-works-0.7.0 spec/support/file_set_helper.rb