Sha256: 2e3324b07f18421403168bd20985d23bb0037b042e62f04c3340207c4b5369c1

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 KB

Contents

require 'spec_helper'
module Exlibris
  module Aleph
    module Table
      module Reader
        describe ItemCirculationPolicies do
          let(:irrelevant_sub_library_codes) { Config.irrelevant_sub_libraries }
          let(:admin_library) { AdminLibrary.new('NYU50') }
          subject(:item_circulation_policies) { ItemCirculationPolicies.new(admin_library) }
          describe '#filename' do
            subject { item_circulation_policies.filename }
            it { should eq 'tab15.eng' }
          end
          describe '#all' do
            subject { item_circulation_policies.all }
            it { should be_an Array }
            it { should_not be_empty }
            it 'should contain Collections' do
              subject.each do |collection|
                expect(collection).to be_a Aleph::Item::CirculationPolicy
              end
            end
            it 'should not include irrelevant codes' do
              subject.find do |item_circulation_policy|
                expect(irrelevant_sub_library_codes).not_to include(item_circulation_policy.identifier.sub_library.code)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
exlibris-aleph-2.0.4 spec/exlibris/aleph/table/reader/item_circulation_policies_spec.rb
exlibris-aleph-2.0.3 spec/exlibris/aleph/table/reader/item_circulation_policies_spec.rb
exlibris-aleph-2.0.0 spec/exlibris/aleph/table/reader/item_circulation_policies_spec.rb