Sha256: 88110c609e6f6a2b739da9ce391cd776f88ee963799c6a11ba91ccd72cb04505

Contents?: true

Size: 906 Bytes

Versions: 8

Compression:

Stored size: 906 Bytes

Contents

require 'spec_helper'

module Stash
  module Wrapper
    describe StashAdministrative do
      describe '#initialize' do
        it 'defaults to no embargo' do
          admin = StashAdministrative.new(
            version: Version.new(number: 1, date: Date.new(2013, 8, 18), note: 'Sample wrapped Datacite document'),
            license: License::CC_BY,
            inventory: Inventory.new(
              files: [
                StashFile.new(pathname: 'HSRC_MasterSampleII.dat', size_bytes: 12_345, mime_type: 'text/plain')
              ])
          )
          embargo = admin.embargo
          expect(embargo).to be_an(Embargo)
          expect(embargo.type).to eq(EmbargoType::NONE)
          expect(embargo.period).to eq('none')
          today = Date.today
          expect(embargo.start_date).to eq(today)
          expect(embargo.end_date).to eq(today)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
stash-wrapper-0.1.9 spec/unit/stash/wrapper/stash_administrative_spec.rb
stash-wrapper-0.1.8 spec/unit/stash/wrapper/stash_administrative_spec.rb
stash-wrapper-0.1.7 spec/unit/stash/wrapper/stash_administrative_spec.rb
stash-wrapper-0.1.6 spec/unit/stash/wrapper/stash_administrative_spec.rb
stash-wrapper-0.1.5 spec/unit/stash/wrapper/stash_administrative_spec.rb
stash-wrapper-0.1.4 spec/unit/stash/wrapper/stash_administrative_spec.rb
stash-wrapper-0.1.3 spec/unit/stash/wrapper/stash_administrative_spec.rb
stash-wrapper-0.1.2 spec/unit/stash/wrapper/stash_administrative_spec.rb