Sha256: 5c7eafe3b6ee442f22d45b2ebc25699f5612b8b02f870c1bfbd8544ebb9fcf93

Contents?: true

Size: 738 Bytes

Versions: 2

Compression:

Stored size: 738 Bytes

Contents

require "helper"
require "minitest/autorun"

class TestCollectionOutput < HoldingsTestCase
  def test_for_hash_output
    coll = load_fixture("holdings_7658449.xml")
    output = coll.to_hash
    assert_kind_of Hash, output
    assert_kind_of Array, output[:records]
    assert_equal '10746154', output[:records].first[:holding_id]
    assert_equal 'GB500 .G23', output[:records].first[:call_number]
  end
  def test_item_elements_in_hash_output
    coll = load_fixture("holdings_4191079.xml")
    output = coll.to_hash
    assert_equal '1', output[:records].first[:item_count]
  end
  def test_item_elements_in_hash_output
    coll = load_fixture("holdings_5351573.xml")
    output = coll.to_hash
#    assert_equal '', output
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
voyager_api-0.1.2 test/holdings/test_collection_output.rb
voyager_api-0.1.1 test/holdings/test_collection_output.rb