Sha256: 7b1957e228d1701b585b8bc480fb6d55c9be185d9ffcc3dbb5b8690f0ecffdd6

Contents?: true

Size: 1.68 KB

Versions: 3

Compression:

Stored size: 1.68 KB

Contents

require 'spec_helper'
module Exlibris
  module Aleph
    module API
      module Reader
        class Patron
          describe Address do
            let(:root) do 
              {
                'reply_text' => 'ok',
                'reply_code' => '0000',
                'registration' => {
                  'translate_change_active_library' => 'NYU50',
                  'institution' => {
                    'inst_name' => 'NYU50',
                    'z305_bor_status_code' => '55',
                    'z305_bor_status' => 'NYU Master.s Student',
                    'z305_bor_type' => nil,
                    'z305_expiry_date' => '20141031',
                    'code' => 'NYU50'
                  }
                }
              }
            end

            subject(:status) { Status.new(root) }
            it { should be_a Status }
            describe '#root' do
              subject { status.root }
              it { should eq root }
            end
            describe '#code' do
              subject { status.code }
              it { should eq '55' }
            end
            describe '#display' do
              subject { status.display }
              it { should eq 'NYU Master.s Student' }
            end
            describe '#type' do
              subject { status.type }
              it { should be_nil }
            end
            describe '#expiration_date' do
              subject { status.expiration_date }
              it { should eq '20141031' }
            end
            describe '#institution_code' do
              subject { status.institution_code }
              it { should eq 'NYU50' }
            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/api/reader/patron/status_spec.rb
exlibris-aleph-2.0.3 spec/exlibris/aleph/api/reader/patron/status_spec.rb
exlibris-aleph-2.0.0 spec/exlibris/aleph/api/reader/patron/status_spec.rb