spec/primo_limo_spec.rb in libis-services-0.1.1 vs spec/primo_limo_spec.rb in libis-services-0.1.2

- old
+ new

@@ -112,12 +112,15 @@ # } } } it 'get record' do - result = subject.get_marc('32LIBIS_ALMA_DS71174288370001471').to_hash(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym }) - check_container(record, result[:record]) + result = subject.get_marc('32LIBIS_ALMA_DS71174288370001471') + if result.is_a?(Libis::Tools::XmlDocument) + result = result.to_hash(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym }) + check_container(record, result[:record]) + end end end context 'pnx' do @@ -352,11 +355,14 @@ } } it 'get record' do - result = subject.get_pnx('32LIBIS_ALMA_DS71174288370001471').to_hash(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym }) - check_container(record, result[:record]) + result = subject.get_pnx('32LIBIS_ALMA_DS71174288370001471') + if result.is_a?(Libis::Tools::XmlDocument) + result = result.to_hash(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym }) + check_container(record, result[:record]) + end end end end