test/pnx/links_test.rb in exlibris-primo-1.0.5 vs test/pnx/links_test.rb in exlibris-primo-1.0.6
- old
+ new
@@ -3,10 +3,12 @@
class LinksTest < Test::Unit::TestCase
def test_fulltexts
record = Exlibris::Primo::Record.new(:raw_xml => dedupmgr_record_xml)
assert_not_nil record.fulltexts
assert((not record.fulltexts.empty?))
+ assert_not_nil(record.fulltexts.first.institution)
+ assert_equal("NYU", record.fulltexts.first.institution)
assert_not_nil(record.fulltexts.first.record_id)
assert_equal("dedupmrg17343091", record.fulltexts.first.record_id)
assert_not_nil(record.fulltexts.first.original_id)
assert_equal("nyu_aleph000932393", record.fulltexts.first.original_id)
assert_not_nil(record.fulltexts.first.url)
@@ -15,10 +17,12 @@
def test_tables_of_contents
record = Exlibris::Primo::Record.new(:raw_xml => dedupmgr_record_xml)
assert_not_nil record.tables_of_contents
assert((not record.tables_of_contents.empty?))
+ assert_not_nil(record.tables_of_contents.first.institution)
+ assert_equal("NYUAD", record.tables_of_contents.first.institution)
assert_not_nil(record.tables_of_contents.first.record_id)
assert_equal("dedupmrg17343091", record.tables_of_contents.first.record_id)
assert_not_nil(record.tables_of_contents.first.original_id)
assert_equal("nyu_aleph002959842", record.tables_of_contents.first.original_id)
assert_not_nil(record.tables_of_contents.first.url)
@@ -29,9 +33,11 @@
def test_related_links
record = Exlibris::Primo::Record.new(:raw_xml => dedupmgr_record_xml)
assert_not_nil record.related_links
assert((not record.related_links.empty?))
+ assert_equal("NYUAD", record.related_links.first.institution)
+ assert_not_nil(record.related_links.first.record_id)
assert_not_nil(record.related_links.first.record_id)
assert_equal("dedupmrg17343091", record.related_links.first.record_id)
assert_not_nil(record.related_links.first.original_id)
assert_equal("nyu_aleph002959842", record.related_links.first.original_id)
assert_not_nil(record.related_links.first.url)
\ No newline at end of file