test/holdings/test_item.rb in voyager_api-0.1.1 vs test/holdings/test_item.rb in voyager_api-0.1.2

- old
+ new

@@ -18,16 +18,10 @@ def test_no_item_statuses record = load_fixture("holdings_289196.xml").records[1] assert_equal 'none', record.item_status[:status] end - def test_item_statuses_not_checked_out - record = load_fixture("holdings_289196.xml").records[0] - assert_equal 'available', record.item_status[:status] - assert_equal 'Not checked out', record.item_status[:messages].first - end - def test_item_status_checkout_patron record = load_fixture("holdings_4191079.xml").records[0] assert_equal 'not_available', record.item_status[:status] assert_equal 'Checked out, due 2011-09-30 23:00:00 - Recall, or try Borrow Direct or ILL.', record.item_status[:messages].first record = load_fixture("holdings_4191079.xml").records[2] @@ -42,22 +36,40 @@ record = load_fixture("holdings_4191079.xml").records[3] assert_equal 'some_available', record.item_status[:status] assert_equal 'v.2 At Bindery. Try Borrow Direct or ILL.', record.item_status[:messages].first end - def test_other_item_statuses - record = load_fixture("holdings_3708764.xml").records[0] - assert_equal 'no.21 (2010) In Process 2011-02-18. Place an In Process item request.', record.item_status[:messages].first, 'status 22 in process' - record = load_fixture("holdings_8828760.xml").records[0] - assert_equal 'Unavailable 2011-08-12. Try Borrow Direct or ILL.', record.item_status[:messages].first, 'status 14 lost' - record = load_fixture("holdings_7140519.xml").records[1] - assert_equal 'In transit 2011-05-09. Place a hold request.', record.item_status[:messages].first, 'status 8 in transit' - record = load_fixture("holdings_8189127.xml").records[0] - assert_equal 'Checked out, due 2011-09-30 21:00:00 (Requests: 1). Try Borrow Direct or ILL.', record.item_status[:messages].first, 'status 2 with request' + def test_item_status_1 + record = load_fixture("holdings_289196.xml").records[0] + assert_equal 'available', record.item_status[:status] + assert_equal 'Not checked out', record.item_status[:messages].first record = load_fixture("holdings_8189127.xml").records[1] assert_equal 'Not checked out (Requests: 1)', record.item_status[:messages].first, 'status 1 with request' + end + + def test_item_status_2 + record = load_fixture("holdings_8189127.xml").records[0] + assert_equal 'Checked out, due 2011-09-30 21:00:00 (Requests: 1). Try Borrow Direct or ILL.', record.item_status[:messages].first, 'status 2 with request' + end + + def test_item_status_7 record = load_fixture("holdings_5351573.xml").records[1] assert_equal 'On hold at Butler Circulation Desk (Requests: 1). Try Borrow Direct or ILL.', record.item_status[:messages].first, 'status 7' end + + def test_item_status_8 + record = load_fixture("holdings_7140519.xml").records[1] + assert_equal 'In transit 2011-05-09. Place a hold request.', record.item_status[:messages].first, 'status 8 in transit' + end + + def test_item_status_14 + record = load_fixture("holdings_8828760.xml").records[0] + assert_equal 'Unavailable 2011-08-12. Try Borrow Direct or ILL.', record.item_status[:messages].first, 'status 14 lost' + end + def test_item_status_22 + record = load_fixture("holdings_3708764.xml").records[0] + assert_equal 'no.21 (2010) In Process 2011-02-18. Place an In Process item request.', record.item_status[:messages].first, 'status 22 in process' + end + end -8189127 +