Sha256: ca6f92674f8f6b7b165e3499ac5c4b62b3f2befaef93f60721883b4df77197d4

Contents?: true

Size: 860 Bytes

Versions: 3

Compression:

Stored size: 860 Bytes

Contents

require 'spec_helper'

module BerkeleyLibrary
  module TIND
    module Mapping
      describe AlmaMultipleTIND do
        let(:additona_245_field) { [Util.datafield('245', [' ', ' '], [Util.subfield('a', 'fake 245 a')])] }
        let(:marc_obj) { ::MARC::Record.new.append(additona_245_field) }

        it ' get tind record' do
          allow_any_instance_of(BerkeleyLibrary::TIND::Mapping::AlmaMultipleTIND).to receive(:alma_record_from).with('991085821143406532').and_return(marc_obj)
          alma_multiple_tind = BerkeleyLibrary::TIND::Mapping::AlmaMultipleTIND.new('991085821143406532')

          allow(alma_multiple_tind).to receive(:base_tind_record).with('991085821143406532', additona_245_field, marc_obj).and_return(marc_obj)
          expect(alma_multiple_tind.record(additona_245_field)).to be marc_obj
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
berkeley_library-tind-0.7.2 spec/berkeley_library/tind/mapping/alma_multiple_tind_spec.rb
berkeley_library-tind-0.7.1 spec/berkeley_library/tind/mapping/alma_multiple_tind_spec.rb
berkeley_library-tind-0.7.0 spec/berkeley_library/tind/mapping/alma_multiple_tind_spec.rb