spec/alma_service_spec.rb in libis-services-0.1.11 vs spec/alma_service_spec.rb in libis-services-0.1.12
- old
+ new
@@ -8,11 +8,11 @@
# noinspection RubyLiteralArrayInspection
let(:record) {
{
leader: '01960nas a2200553u 4500',
- controlfield: ['9930800070101471', '20160801110041.0', '881205c19679999be r|p|| 0|||a|dut c'],
+ controlfield: ['9930800070101471', '20170602113306.0', '881205c19679999be r|p|| 0|||a|dut c'],
datafield: [
{
subfield: '(BeLVLBS)003080007LBS01-Aleph',
:@tag => '035', :@ind1 => ' ', :@ind2 => ' '
}, {
@@ -63,80 +63,80 @@
}, {
subfield: 'KYE000486',
:@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1967)7-35, 37-52'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1968)1-14, 17-49'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1969)1-10, 12-37, 39-49'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1970)1-50 volledig'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1971)1-28, 30-31, 33-37, 41-49'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1972)22, 30-32, 34-36, 38-50'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1973)1-50 volledig'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1974)1-25, 27-50'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1975)-(1992)volledig'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1993)1-10, 12-50'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1994)-(1996)volledig'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1997)volledig'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(1998)1-53'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(2000)1-16, 18-52'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(2001)-(2003)volledig'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(2004)1-53'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(2005)1-8, 10-52'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(2006)1-26, 29, 32-52'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(2007)39-42, 44, 46-49, 51-52'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(2008)1-28, 32-53'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(2009)1-34, 36-38'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', '(2011)1-13, 15-36, 45-52'],
- :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', 'KADOC elektronische tijdschriften'],
- :@tag => '995', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}, {
subfield: ['EKAD', 'KADOC lopende periodiek'],
- :@tag => '995', :@ind1 => ' ', :@ind2 => ' '
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
}
],
}
}
@@ -158,12 +158,12 @@
}
it 'get record' do
result = subject.get_marc('9930800070101480', 'l7xx8879c82a7d7b453a887a6e6dca8300fd').
to_hash(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym })
- puts result
- check_container(record, result[:bib][:record])
+ # ap result
+ expect(result[:bib][:record]).to deep_include(record)
end
end
end
@@ -176,10 +176,10 @@
it 'search' do
result = subject.search('alma.local_field_983', 'KYE000486')
expect(result.size).to be 1
result = result.first.to_hash(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym })
- check_container(record, result[:record])
+ expect(result[:record]).to deep_include(record)
end
end
end
end