Sha256: cc143a33b8a3a726884e9fc7ac15a7abfc495bf4c05aeac027ea7e699c1c7168
Contents?: true
Size: 1.47 KB
Versions: 17
Compression:
Stored size: 1.47 KB
Contents
require "helper" require "minitest/autorun" class TestOrder < HoldingsTestCase def test_no_current_issues record = load_fixture('holdings_289196.xml').records[0] assert_equal [], record.current_issues record = load_fixture('holdings_289196.xml').records[1] assert_equal [], record.current_issues end def test_current_issues record = load_fixture('holdings_289196.xml').records[2] assert_kind_of Array, record.current_issues assert_equal "v. 116, no. 3 (2011 June)", record.current_issues[0] end def test_order_statuses record = load_fixture('holdings_8615744.xml').records.first assert_kind_of Array, record.orders assert_equal '0', record.orders.first[:status_code] assert_equal 'In the Pre-Order Process. Try Borrow Direct or ILL.', record.orders.first[:long_message], "status 0" record = load_fixture('holdings_8267323.xml').records.first assert_kind_of Array, record.orders assert_equal 'Received 2011-08-09. Place an In Process item request.', record.orders.first[:long_message], "status 1" record = load_fixture('holdings_7471326.xml').records.first assert_kind_of Array, record.orders assert_equal 'Not yet received; claimed 2011-08-08. Try Borrow Direct or ILL.', record.orders.first[:long_message], "status 4" record = load_fixture('holdings_8918502.xml').records.first assert_kind_of Array, record.orders assert_equal 'Copy On Order 2011-08-09', record.orders.first[:short_message], "status 8" end end
Version data entries
17 entries across 17 versions & 1 rubygems