Sha256: 417d8c7a6bbd4b8eff14d187fca4b317b51e9e0c0a504a23a067959b007c1e15

Contents?: true

Size: 1.3 KB

Versions: 3

Compression:

Stored size: 1.3 KB

Contents

require 'spec_helper'
module Exlibris
  module Aleph
    module API
      module Client
        class Patron
          describe Record, vcr: {cassette_name: 'patron', record: :new_episodes} do
            let(:patron_id) { 'BOR_ID' }
            let(:id) { 'NYU01000980206' }
            subject(:record) { Record.new(patron_id, id) }
            it { should be_a Record }
            describe '#patron_id' do
              subject { record.patron_id }
              it { should eq patron_id }
            end
            describe '#id' do
              subject { record.id }
              it { should eq id }
            end
            describe '#reply_code' do
              subject { record.reply_code }
              it { should eq '0000' }
            end
            describe '#reply_text' do
              subject { record.reply_text }
              it { should eq 'ok' }
            end
            describe '#error?' do
              subject { record.error? }
              it { should be_false }
            end
            describe '#to_h' do
              subject { record.to_h }
              it { should be_a Hash }
            end
            describe '#to_xml' do
              subject { record.to_xml }
              it { should be_a String }
            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/client/patron/record_spec.rb
exlibris-aleph-2.0.3 spec/exlibris/aleph/api/client/patron/record_spec.rb
exlibris-aleph-2.0.0 spec/exlibris/aleph/api/client/patron/record_spec.rb