Sha256: 9de830fdcd809941da4022e87d4ec5c525948317af85989261e8eba5ef966e91
Contents?: true
Size: 1.42 KB
Versions: 3
Compression:
Stored size: 1.42 KB
Contents
require 'spec_helper' module Exlibris module Aleph module API module Client class Record describe Holdings, vcr: {cassette_name: 'record', record: :new_episodes} do let(:record_id) { 'NYU01000980206' } let(:view) { 'full' } let(:query) { { view: view } } subject(:holdings) { Holdings.new(record_id, query) } it { should be_a Holdings } describe '#id' do subject { holdings.record_id } it { should eq record_id } end describe '#reply_code' do subject { holdings.reply_code } it { should eq '0000' } end describe '#reply_text' do subject { holdings.reply_text } it { should eq 'ok' } end describe '#error?' do subject { holdings.error? } it { should be_false } end describe '#to_h' do subject { holdings.to_h } it { should be_a Hash } end describe '#to_xml' do subject { holdings.to_xml } it { should be_a String } end context 'when initialized without a "query" argument' do subject { Holdings.new(record_id) } it { should be_a Holdings } end end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems