Sha256: b280c21311b27a04a9c168a8bff8c3fe82b28ff9a5e24556aebd4d6a61fd83b6

Contents?: true

Size: 531 Bytes

Versions: 1

Compression:

Stored size: 531 Bytes

Contents

require 'tempfile'

module Ezid
  RSpec.describe BatchDownload do

    subject do
      a_week_ago = (Time.now - (7*24*60*60)).to_i
      described_class.new(:anvl, compression: "zip", permanence: "test", status: "public", createdAfter: a_week_ago)
    end

    its(:download_url) { is_expected.to match(/\Ahttp:\/\/ezid\.cdlib\.org\/download\/\w+\.zip\z/) }

    specify {
      Dir.mktmpdir do |tmpdir|
        expect(subject.download_file(path: tmpdir))
          .to match(/\A#{tmpdir}\/\w+\.zip\z/)
      end
    }

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ezid-client-1.6.0 spec/integration/batch_download_spec.rb