Skip to content

Commit

Permalink
add recordtype id test
Browse files Browse the repository at this point in the history
  • Loading branch information
charmingduchess committed Dec 3, 2024
1 parent ba5efc5 commit dde5b4c
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 54 deletions.
110 changes: 56 additions & 54 deletions test/fixtures/query-bf6caf242f418048cb7522997f55f4fa.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"took": 4,
"took": 6,
"timed_out": false,
"_shards": {
"total": 2,
Expand All @@ -12,12 +12,12 @@
"value": 1,
"relation": "eq"
},
"max_score": 15.73737,
"max_score": 14.937069,
"hits": [
{
"_index": "resources-2024-10-22",
"_id": "b10022950",
"_score": 15.73737,
"_score": 14.937069,
"_source": {
"extent": [
"224 p. ;"
Expand All @@ -44,24 +44,24 @@
"numItemsTotal": [
1
],
"createdYear": [
1974
],
"buildingLocationIds": [
"ma"
],
"createdYear": [
1974
],
"title": [
"Religion--love or hate?"
],
"type": [
"nypl:Item"
],
"shelfMark": [
"*PGZ 81-1452"
],
"numItemVolumesParsed": [
0
],
"shelfMark": [
"*PGZ 81-1452"
],
"createdString": [
"1974"
],
Expand Down Expand Up @@ -95,7 +95,8 @@
"value": "(WaOLN)nyp0023028"
}
],
"updatedAt": 1711072100364,
"popularity": 1,
"updatedAt": 1733243246425,
"publicationStatement": [
"New York : [D. Kirshenbaum], 1974."
],
Expand Down Expand Up @@ -136,6 +137,7 @@
"Religion--love or hate? / by David Kirshenbaum."
],
"uri": "b10022950",
"recordTypeId": "a",
"placeOfPublication": [
"New York"
],
Expand Down Expand Up @@ -170,79 +172,79 @@
},
"_score": null,
"_source": {
"accessMessage": [
{
"id": "accessMessage:1",
"label": "Use in library"
}
],
"accessMessage_packed": [
"accessMessage:1||Use in library"
],
"identifier": [
"urn:shelfmark:*PGZ 81-1452",
"urn:barcode:33433103848853"
],
"m2CustomerCode": [
"XH"
],
"physicalLocation": [
"*PGZ 81-1452"
"catalogItemType": [
{
"id": "catalogItemType:2",
"label": "book non-circ"
}
],
"shelfMark_sort": "a*PGZ 81-001452",
"catalogItemType_packed": [
"catalogItemType:2||book non-circ"
],
"accessMessage": [
"formatLiteral": [
"Text"
],
"holdingLocation": [
{
"id": "accessMessage:1",
"label": "Use in library"
"id": "loc:maf92",
"label": "Schwarzman Building - Dorot Jewish Division Room 111"
}
],
"status_packed": [
"status:a||Available"
"holdingLocation_packed": [
"loc:maf92||Schwarzman Building - Dorot Jewish Division Room 111"
],
"type": [
"bf:Item"
"idBarcode": [
"33433103848853"
],
"shelfMark": [
"*PGZ 81-1452"
"identifier": [
"urn:shelfmark:*PGZ 81-1452",
"urn:barcode:33433103848853"
],
"uri": "i14749981",
"identifierV2": [
{
"type": "bf:ShelfMark",
"value": "*PGZ 81-1452"
"value": "*PGZ 81-1452",
"type": "bf:ShelfMark"
},
{
"type": "bf:Barcode",
"value": "33433103848853"
"value": "33433103848853",
"type": "bf:Barcode"
}
],
"holdingLocation_packed": [
"loc:maf92||Schwarzman Building M2 - Dorot Jewish Division Room 111"
"m2CustomerCode": [
"XH"
],
"idBarcode": [
"33433103848853"
"physicalLocation": [
"*PGZ 81-1452"
],
"requestable": [
true
],
"catalogItemType": [
{
"id": "catalogItemType:2",
"label": "book non-circ"
}
],
"formatLiteral": [
"Text"
],
"holdingLocation": [
{
"id": "loc:maf92",
"label": "Schwarzman Building M2 - Dorot Jewish Division Room 111"
}
"shelfMark": [
"*PGZ 81-1452"
],
"shelfMark_sort": "a*PGZ 81-001452",
"status": [
{
"id": "status:a",
"label": "Available"
}
]
],
"status_packed": [
"status:a||Available"
],
"type": [
"bf:Item"
],
"uri": "i14749981"
},
"sort": [
null
Expand All @@ -263,7 +265,7 @@
"sum_other_doc_count": 0,
"buckets": [
{
"key": "loc:maf92||Schwarzman Building M2 - Dorot Jewish Division Room 111",
"key": "loc:maf92||Schwarzman Building - Dorot Jewish Division Room 111",
"doc_count": 1
}
]
Expand Down
2 changes: 2 additions & 0 deletions test/resources-responses.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ describe('Test Resources responses', function () {

assert(doc.itemAggregations)

assert.deepEqual(doc.recordType, { '@id': 'recordType:a', prefLabel: 'Book/Text' })

done()
})
})
Expand Down

0 comments on commit dde5b4c

Please sign in to comment.