Sha256: 446315fbb0970fe9910e6fb413f49bc9e249ea02918ae4db1ee93fab03e5928b

Contents?: true

Size: 737 Bytes

Versions: 1

Compression:

Stored size: 737 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_526843.xml")
    output = coll.to_hash
#    assert_equal '', output
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voyager_api-0.1.0 test/holdings/test_collection_output.rb