From e4aa063ed2b18f212748b9b1a1a2f4bfad973b9f Mon Sep 17 00:00:00 2001 From: Paul Beaudoin Date: Tue, 18 Jun 2024 21:19:05 -0400 Subject: [PATCH] Update qa-node20 branch with upstream changes. --- README.md | 1 + config/qa.env | 6 +- data/onsite-edd-criteria.json | 9 +- lib/delivery-locations-resolver.js | 11 +- lib/requestability_resolver.js | 13 +- lib/resources.js | 6 +- test/delivery-locations-resolver.test.js | 24 +- test/fixtures/no_recap_response.js | 808 ++++++++++++++++++ ...uery-0ac2d4be36677658e58b21fac9368305.json | 17 - ...code-1f8ce439dff513362111cf43901b9f10.json | 22 - ...code-4a86f5100c2412aa6c747b6a4980a8b8.json | 502 ----------- ...code-4eb3fad2438146c7e687a865179ebc89.json | 502 ----------- ...code-68ce5c58a3564375af1881bf50830494.json | 7 - ...code-6d9bc4ccfec5900d645ec91611d139ee.json | 502 ----------- ...code-920faf2b789b32c7661692d9155560ff.json | 22 - ...code-9ca059b8418a8cc7ed13bafc739bffd4.json | 7 - ...code-a522b2198195ab55442d41136a902254.json | 7 - ...code-aa04b0e8383fc73d48d88403eea37e2c.json | 7 - ...code-b4ab79b5bce17604bea7d6e8569a05d0.json | 7 - ...code-d9e8022a9e991935d867b23b15546742.json | 12 - ...code-de2b279b21a808f0b0ca151f03968031.json | 17 - ...code-f7449c752a123dd05ff2d438b7def61e.json | 7 - ...code-ff5b8e7ea9a28bf4a8c8409597bbf6df.json | 7 - test/location_label_updater.test.js | 4 +- test/requestability_resolver.test.js | 19 + 25 files changed, 877 insertions(+), 1669 deletions(-) create mode 100644 test/fixtures/no_recap_response.js delete mode 100644 test/fixtures/query-0ac2d4be36677658e58b21fac9368305.json delete mode 100644 test/fixtures/scsb-by-barcode-1f8ce439dff513362111cf43901b9f10.json delete mode 100644 test/fixtures/scsb-by-barcode-4a86f5100c2412aa6c747b6a4980a8b8.json delete mode 100644 test/fixtures/scsb-by-barcode-4eb3fad2438146c7e687a865179ebc89.json delete mode 100644 test/fixtures/scsb-by-barcode-68ce5c58a3564375af1881bf50830494.json delete mode 100644 test/fixtures/scsb-by-barcode-6d9bc4ccfec5900d645ec91611d139ee.json delete mode 100644 test/fixtures/scsb-by-barcode-920faf2b789b32c7661692d9155560ff.json delete mode 100644 test/fixtures/scsb-by-barcode-9ca059b8418a8cc7ed13bafc739bffd4.json delete mode 100644 test/fixtures/scsb-by-barcode-a522b2198195ab55442d41136a902254.json delete mode 100644 test/fixtures/scsb-by-barcode-aa04b0e8383fc73d48d88403eea37e2c.json delete mode 100644 test/fixtures/scsb-by-barcode-b4ab79b5bce17604bea7d6e8569a05d0.json delete mode 100644 test/fixtures/scsb-by-barcode-d9e8022a9e991935d867b23b15546742.json delete mode 100644 test/fixtures/scsb-by-barcode-de2b279b21a808f0b0ca151f03968031.json delete mode 100644 test/fixtures/scsb-by-barcode-f7449c752a123dd05ff2d438b7def61e.json delete mode 100644 test/fixtures/scsb-by-barcode-ff5b8e7ea9a28bf4a8c8409597bbf6df.json diff --git a/README.md b/README.md index 97f031f8..275d3063 100644 --- a/README.md +++ b/README.md @@ -206,3 +206,4 @@ There is currently one feature flag in this app, which is 'no-on-site-edd'. When NB: numAvailable and numItem*Parsed counts do not **exclude** the e-item, but these items are not indexed with statuses, volumes, or date ranges, and are therefore not actually included in this count. NB: As the table above indicates, there is a mismatch between what the front end and API regard as "electronic items". As far as the API is concerned, there is only at most ONE electronic item, which can have many electronic locator values. `numElectronicResources` counts these locator values, but the other item count values treat all the electronic resources as a single item. + diff --git a/config/qa.env b/config/qa.env index 06d7fd15..848e89ee 100644 --- a/config/qa.env +++ b/config/qa.env @@ -1,6 +1,6 @@ -# Greg built self-hosted production domain: -ENCRYPTED_ELASTICSEARCH_URI=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAHgwdgYJKoZIhvcNAQcGoGkwZwIBADBiBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDIYpOz/BbRlJZUul7gIBEIA1idumQ6fdf/j5/pzF4t96MGGH/eV1gD4WCyLUnScgNYqtRNK0ajRO6XVroswsrJtgCwUerDM= -ENCRYPTED_RESOURCES_INDEX=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAHIwcAYJKoZIhvcNAQcGoGMwYQIBADBcBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDDHuuuG/vsNVvjm2BgIBEIAvNe+XrgVv1D1W1WLqvsTWrCET7oK3/LlvfcQwFWIW0W4dONlDbU9UXrlufonpJ5M= +# Currently, this is our ES 5.3 for QA: +ENCRYPTED_ELASTICSEARCH_URI=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAALswgbgGCSqGSIb3DQEHBqCBqjCBpwIBADCBoQYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAyWLvUSzA/IAQCHl0MCARCAdNpF/Z1VJESwJ7hcwo/BqZz2mTDPA9NAPQ4zuPLsItz9A2lfHaP03bPuo9nq8VP5AKLOa4zPL0VoBmwEjj9qCCb+LSpQ3m+OoyM3BxG98/qYEcwXXOa8+0fH1x5asVrup/YICJdeD6jOewxttzzxCCGXEklL +ENCRYPTED_RESOURCES_INDEX=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAHIwcAYJKoZIhvcNAQcGoGMwYQIBADBcBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDI88/9macimvmLyWCAIBEIAvMUOAtF2Miq+8u7/A9fzBz57LavqkeLJmv8dd7WQzdA9lhqPkjUK0pzYtxsPe6Nk= ENCRYPTED_SCSB_URL=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAH8wfQYJKoZIhvcNAQcGoHAwbgIBADBpBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDBKllElmWYLxGOGopQIBEIA8JJyKde/8m8iCJGKR5D8HoTJhXHeyvw9eIDeuUNKiXLfJwoVz+PDAZSxkCQtM9O91zGhXbe3l6Bk1RlYJ ENCRYPTED_SCSB_API_KEY=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAGMwYQYJKoZIhvcNAQcGoFQwUgIBADBNBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDNw8KXkyN8HvtjAX0gIBEIAgX+XG2fxTj6kSchrd/dfHB05KU5pkT0LtPxUTuNCXoLc= diff --git a/data/onsite-edd-criteria.json b/data/onsite-edd-criteria.json index 233ed669..21ff7b04 100644 --- a/data/onsite-edd-criteria.json +++ b/data/onsite-edd-criteria.json @@ -34,19 +34,15 @@ "maf", "maf82", "maf92", - "maff1", "maff3", "mag", "mag82", "mag92", - "magg1", "magg2", "magg3", - "magh1", "mai", "mai82", "mai92", - "maii1", "maii2", "maii3", "maj92", @@ -57,13 +53,11 @@ "mal72", "mal82", "mal92", - "mall1", "malm2", "malv2", "map", "map82", "map92", - "mapp1", "mapp2", "mapp3", "mas62", @@ -71,7 +65,9 @@ "mas92", "pad22", "pad32", + "pam22", "pah", + "pah22", "pah32", "pam", "pam32", @@ -80,7 +76,6 @@ "pat22", "pat32", "scf", - "scff1", "scff2", "scff3" ] diff --git a/lib/delivery-locations-resolver.js b/lib/delivery-locations-resolver.js index 1521ff07..78ee2bf4 100644 --- a/lib/delivery-locations-resolver.js +++ b/lib/delivery-locations-resolver.js @@ -214,7 +214,16 @@ class DeliveryLocationsResolver { // location is not requestable: let deliveryLocation let eddRequestable - if (!isItemNyplOwned(item) || this.requestableBasedOnHoldingLocation(item)) { + const hasRecapCustomerCode = item.recapCustomerCode && item.recapCustomerCode[0] + const nyplItem = isItemNyplOwned(item) + if (!hasRecapCustomerCode) { + const requestableBasedOnHoldingLocation = nyplItem ? this.requestableBasedOnHoldingLocation(item) : true + // the length of the list of delivery locations is checked later to determine physical requestability + // In case of an offsite item with no recap customer code, we want this to be based on holding location + // so we put a placeholder '' in case it is requestable based on holding location + deliveryLocation = requestableBasedOnHoldingLocation ? [''] : [] + eddRequestable = requestableBasedOnHoldingLocation + } else if (!nyplItem || this.requestableBasedOnHoldingLocation(item)) { deliveryLocation = this.deliveryLocationsByRecapCustomerCode(item.recapCustomerCode[0]) eddRequestable = this.__eddRequestableByCustomerCode(item.recapCustomerCode[0]) } else { diff --git a/lib/requestability_resolver.js b/lib/requestability_resolver.js index 1bc7daa3..0b192d6c 100644 --- a/lib/requestability_resolver.js +++ b/lib/requestability_resolver.js @@ -12,15 +12,14 @@ class RequestabilityResolver { const itemIsInRecap = isInRecap(item) let physRequestableCriteria const hasRecapCustomerCode = item.recapCustomerCode && item.recapCustomerCode[0] - if (itemIsInRecap && !hasRecapCustomerCode) { + if (itemIsInRecap) { // recap items missing codes should default to true for phys and edd - // requestable. - physRequestableCriteria = 'Missing customer code' - deliveryInfo = { eddRequestable: true, deliveryLocation: [''] } - } else if (itemIsInRecap && hasRecapCustomerCode) { + // requestable, unless it has a non-requestable holding location deliveryInfo = DeliveryLocationsResolver.getRecapDeliveryInfo(item) - physRequestableCriteria = `${(deliveryInfo.deliveryLocation && - deliveryInfo.deliveryLocation.length) || 0} delivery locations.` + physRequestableCriteria = hasRecapCustomerCode + ? `${(deliveryInfo.deliveryLocation && + deliveryInfo.deliveryLocation.length) || 0} delivery locations.` + : 'Missing customer code' } else if (!itemIsInRecap) { deliveryInfo = DeliveryLocationsResolver.getOnsiteDeliveryInfo(item) physRequestableCriteria = `${(deliveryInfo.deliveryLocation && diff --git a/lib/resources.js b/lib/resources.js index efce2583..986ffc28 100644 --- a/lib/resources.js +++ b/lib/resources.js @@ -83,7 +83,8 @@ const SEARCH_SCOPES = { 'parallelPublisher', 'uniformTitle.folded', 'parallelUniformTitle', - 'formerTitle' + 'formerTitle', + 'addedAuthorTitle' ] }, title: { @@ -102,7 +103,8 @@ const SEARCH_SCOPES = { 'parallelTitleAlt.folded', 'parallelCreatorLiteral.folded', 'parallelUniformTitle', - 'formerTitle' + 'formerTitle', + 'addedAuthorTitle' ] }, contributor: { diff --git a/test/delivery-locations-resolver.test.js b/test/delivery-locations-resolver.test.js index 21672f5d..dd0b055a 100644 --- a/test/delivery-locations-resolver.test.js +++ b/test/delivery-locations-resolver.test.js @@ -11,7 +11,7 @@ const sampleItems = { ], holdingLocation: [ { - id: 'loc:scff3', + id: 'loc:scff2', prefLabel: 'Schomburg Center - Research & Reference - Desk' } ], @@ -46,7 +46,7 @@ const sampleItems = { uri: 'i12227153', holdingLocation: [ { - id: 'loc:scff1', + id: 'loc:scf', label: 'Schomburg Center - Research & Reference' } ], @@ -530,4 +530,24 @@ describe('Delivery-locations-resolver', function () { ).to.equal(true) }) }) + describe('getRecapDeliveryInfo', function () { + it('returns empty deliveryLocation and eddRequestable false based on holding location when missing recapCustomerCode', function () { + const resolved = DeliveryLocationsResolver.getRecapDeliveryInfo({ + holdingLocation: [{ id: 'loc:rccd8' }], + uri: 'i14747243' + }) + expect(resolved.deliveryLocation.length).to.equal(0) + expect(resolved.eddRequestable).to.equal(false) + }) + + it('returns empty string delivery location and eddRequestable true based on holding location when missing recapCustomerCode', function () { + const resolved = DeliveryLocationsResolver.getRecapDeliveryInfo({ + holdingLocation: [{ id: 'loc:rcpm2' }], + uri: 'i14747243' + }) + expect(resolved.deliveryLocation.length).to.equal(1) + expect(resolved.deliveryLocation[0]).to.equal('') + expect(resolved.eddRequestable).to.equal(true) + }) + }) }) diff --git a/test/fixtures/no_recap_response.js b/test/fixtures/no_recap_response.js new file mode 100644 index 00000000..18ee781c --- /dev/null +++ b/test/fixtures/no_recap_response.js @@ -0,0 +1,808 @@ +exports.fakeElasticSearchResponseNyplItem = () => { + return { + _shards: { + failed: 0, + successful: 1, + total: 1 + }, + took: 1, + hits: { + total: 1, + max_score: 1.3862944, + hits: [ + { + _id: 'b10980129', + _source: { + numItems: [ + 4 + ], + createdString: [ + '1989' + ], + issuance: [ + { + label: 'monograph/item', + id: 'urn:biblevel:m' + } + ], + creatorLiteral: [ + 'Maḥfūẓ, Najīb, 1911-2006.' + ], + creator_sort: [ + 'maḥfūẓ, najīb, 1911-2006.' + ], + level: 'debug', + items: [ + { + uri: 'i22566485', + identifier: [ + 'urn:barcode:33433058338470' + ], + status: [ + { + label: 'Available', + id: 'status:a' + } + ] + }, + { + uri: 'i22566489' + }, + { + holdingLocation_packed: [ + 'loc:scff2||Schomburg Center - Research & Reference' + ], + suppressed: [ + false + ], + shelfMark: [ + 'Sc D 90-863' + ], + accessMessage_packed: [ + 'accessMessage:1||USE IN LIBRARY' + ], + uri: 'i10283665', + accessMessage: [ + { + label: 'USE IN LIBRARY', + id: 'accessMessage:1' + } + ], + catalogItemType: [ + { + id: 'catalogItemType:2', + label: 'book non-circ' + } + ], + deliveryLocation_packed: [ + 'loc:sc||Schomburg Center' + ], + owner: [ + { + label: 'Schomburg Center for Research in Black Culture, Jean Blackwell Hutson Research and Reference Division', + id: 'orgs:1114' + } + ], + deliveryLocation: [ + { + label: 'Schomburg Center', + id: 'loc:sc' + } + ], + identifier: [ + 'urn:barcode:32101071572406' + ], + requestable: [ + true + ], + owner_packed: [ + 'orgs:1114||Schomburg Center for Research in Black Culture, Jean Blackwell Hutson Research and Reference Division' + ], + status: [ + { + label: 'Available', + id: 'status:a' + } + ], + holdingLocation: [ + { + label: 'Schomburg Center - Research & Reference', + id: 'loc:scff2' + } + ], + status_packed: [ + 'status:a||Available' + ] + }, + { + holdingLocation_packed: [ + 'loc:scff2||Schomburg Center - Research & Reference' + ], + suppressed: [ + false + ], + shelfMark: [ + 'Sc D 90-863' + ], + accessMessage_packed: [ + 'accessMessage:1||USE IN LIBRARY' + ], + uri: 'i10283665777', + accessMessage: [ + { + label: 'USE IN LIBRARY', + id: 'accessMessage:1' + } + ], + catalogItemType: [ + { + id: 'catalogItemType:2', + label: 'book non-circ' + } + ], + deliveryLocation_packed: [ + 'loc:sc||Schomburg Center' + ], + owner: [ + { + label: 'Schomburg Center for Research in Black Culture, Jean Blackwell Hutson Research and Reference Division', + id: 'orgs:1114' + } + ], + deliveryLocation: [ + { + label: 'Schomburg Center', + id: 'loc:sc' + } + ], + identifier: [ + 'urn:barcode:32101071572406777' + ], + requestable: [ + true + ], + owner_packed: [ + 'orgs:1114||Schomburg Center for Research in Black Culture, Jean Blackwell Hutson Research and Reference Division' + ], + status: [ + { + label: 'Not Available', + id: 'status:na' + } + ], + holdingLocation: [ + { + label: 'Schomburg Center - Research & Reference', + id: 'loc:scff2' + } + ], + status_packed: [ + 'status:na||Not Available' + ] + }, + { + holdingLocation: [ + { + label: 'OFFSITE - Request in Advance', + id: 'loc:rc2ma' + } + ], + status_packed: [ + 'status:na||Not Available' + ], + owner: [ + { + id: 'orgs:1000', + label: 'Stephen A. Schwarzman Building' + } + ], + deliveryLocation: [ + { + id: 'loc:mala', + label: 'SASB - Allen Scholar Room' + } + ], + deliveryLocation_packed: [ + 'loc:mala||SASB - Allen Scholar Room' + ], + uri: 'i10283664', + accessMessage_packed: [ + 'accessMessage:2||ADV REQUEST' + ], + accessMessage: [ + { + id: 'accessMessage:2', + label: 'ADV REQUEST' + } + ], + status: [ + { + id: 'status:na', + label: 'Not available' + } + ], + owner_packed: [ + 'orgs:1000||Stephen A. Schwarzman Building' + ], + requestable: [ + false + ], + identifier: [ + 'urn:barcode:1000546836' + ], + holdingLocation_packed: [ + 'loc:rc2ma||OFFSITE - Request in Advance' + ], + shelfMark: [ + '*OFC 90-2649' + ], + suppressed: [ + false + ] + }, + { + holdingLocation: [ + { + label: 'OFFSITE - Request in Advance', + id: 'loc:rc2ma' + } + ], + status_packed: [ + 'status:a||Available' + ], + owner: [ + { + id: 'orgs:1000', + label: 'Stephen A. Schwarzman Building' + } + ], + deliveryLocation: [ + { + id: 'loc:mala', + label: 'SASB - Allen Scholar Room' + } + ], + deliveryLocation_packed: [ + 'loc:mala||SASB - Allen Scholar Room' + ], + uri: 'i102836649', + recapCustomerCode: [], + accessMessage_packed: [ + 'accessMessage:2||ADV REQUEST' + ], + accessMessage: [ + { + id: 'accessMessage:2', + label: 'ADV REQUEST' + } + ], + status: [ + { + id: 'status:a', + label: 'Available' + } + ], + owner_packed: [ + 'orgs:1000||Stephen A. Schwarzman Building' + ], + requestable: [ + false + ], + identifier: [ + 'urn:barcode:10005468369' + ], + holdingLocation_packed: [ + 'loc:rc2ma||OFFSITE - Request in Advance' + ], + shelfMark: [ + '*OFC 90-2649 2' + ], + suppressed: [ + false + ] + }, + { + holdingLocation: [ + { + label: 'OFFSITE - Request in Advance', + id: 'loc:dya0f' + } + ], + status_packed: [ + 'status:a||Available' + ], + owner: [ + { + id: 'orgs:1000', + label: 'Stephen A. Schwarzman Building' + } + ], + deliveryLocation: [ + { + id: 'loc:mala', + label: 'SASB - Allen Scholar Room' + } + ], + deliveryLocation_packed: [ + 'loc:mala||SASB - Allen Scholar Room' + ], + uri: 'i102836659', + recapCustomerCode: [], + accessMessage_packed: [ + 'accessMessage:2||ADV REQUEST' + ], + accessMessage: [ + { + id: 'accessMessage:2', + label: 'ADV REQUEST' + } + ], + status: [ + { + id: 'status:a', + label: 'Available' + } + ], + owner_packed: [ + 'orgs:1000||Stephen A. Schwarzman Building' + ], + requestable: [ + false + ], + identifier: [ + 'urn:barcode:10005468369' + ], + holdingLocation_packed: [ + 'loc:dya0f||OFFSITE - Request in Advance' + ], + shelfMark: [ + '*OFC 90-2649 2' + ], + suppressed: [ + false + ] + }, + { + holdingLocation: [ + { + label: 'OFFSITE - Request in Advance (unrequestable location)', + id: 'loc:rcpd8' + } + ], + status_packed: [ + 'status:a||Available' + ], + owner: [ + { + id: 'orgs:1000', + label: 'Stephen A. Schwarzman Building' + } + ], + uri: 'i102836649-unrequestable', + accessMessage_packed: [ + 'accessMessage:2||ADV REQUEST' + ], + accessMessage: [ + { + id: 'accessMessage:2', + label: 'ADV REQUEST' + } + ], + status: [ + { + id: 'status:a', + label: 'Available' + } + ], + owner_packed: [ + 'orgs:1000||Stephen A. Schwarzman Building' + ], + requestable: [ + false + ], + identifier: [ + 'urn:barcode:10005468369' + ], + holdingLocation_packed: [ + 'loc:rcpd8||OFFSITE - Request in Advance' + ], + shelfMark: [ + '*OFC 90-2649 2' + ], + suppressed: [ + false + ] + } + ], + message: 'ResourceSerializer#serialize', + materialType_packed: [ + 'resourcetypes:txt||Text' + ], + suppressed: [ + 'false' + ], + placeOfPublication: [ + 'New York :' + ], + dateEndString: [ + '1984' + ], + title_sort: [ + 'the thief and the dogs' + ], + uris: [ + 'b11293188', + 'b11293188-i22566485', + 'b11293188-i22566489', + 'b11293188-i10283665', + 'b11293188-i10283664' + ], + language: [ + { + id: 'lang:eng', + label: 'English' + } + ], + dateString: [ + '1989' + ], + identifier: [ + 'urn:bnum:11293188', + 'urn:oclc:12248278', + 'urn:lcc:PJ7846.A46', + 'urn:lccCoarse:PJ7695.8-7976' + ], + publisher: [ + 'Doubleday,' + ], + type: [ + 'nypl:Item' + ], + createdYear: [ + 1989 + ], + contributor_sort: [ + 'badawī, muḥammad muṣṭafá.' + ], + materialType: [ + { + id: 'resourcetypes:txt', + label: 'Text' + } + ], + numAvailable: [ + 2 + ], + dimensions: [ + '22 cm.' + ], + carrierType_packed: [ + 'carriertypes:nc||volume' + ], + note: [ + 'Translation of: al-Liṣṣ wa-al-kilāb.' + ], + dateStartYear: [ + 1989 + ], + shelfMark: [ + '*OFC 90-2649' + ], + idOwi: [ + 'urn:owi:58201773' + ], + mediaType: [ + { + label: 'unmediated', + id: 'mediatypes:n' + } + ], + title: [ + 'The thief and the dogs', + 'The thief and the dogs /' + ], + titleAlt: [ + 'Liṣṣ wa-al-kilāb.' + ], + language_packed: [ + 'lang:eng||English' + ], + mediaType_packed: [ + 'mediatypes:n||unmediated' + ], + titleDisplay: [ + 'The thief and the dogs / Naguib Mahfouz ; translated by Trevor Le Gassick, M.M. Badawi ; revised by John Rodenbeck.' + ], + uri: 'b11293188', + extent: [ + '158 p. ;' + ], + carrierType: [ + { + id: 'carriertypes:nc', + label: 'volume' + } + ], + issuance_packed: [ + 'urn:biblevel:m||monograph/item' + ], + contributorLiteral: [ + 'Badawī, Muḥammad Muṣṭafá.', + 'Le Gassick, Trevor.', + 'Rodenbeck, John.' + ], + dateEndYear: [ + 1984 + ] + }, + _type: 'resource', + _index: 'resources-2017-06-13', + _score: 154.93451 + } + ] + }, + timed_out: false + } +} + +exports.fakeElasticSearchResponseCulItem = () => { + return { + _shards: { + failed: 0, + successful: 1, + total: 1 + }, + took: 1, + hits: { + total: 1, + max_score: 1.3862944, + hits: [ + { + _type: 'resource', + _id: 'cb1000077', + _source: { + extent: [ + 'iii, 332 leaves, bound.' + ], + note: [ + { + noteType: 'Thesis', + label: 'Thesis (Ph. D.)--Columbia University, 1989.', + type: 'bf:Note' + }, + { + noteType: 'Bibliography', + label: 'Includes bibliographical references (leaves 314-332).', + type: 'bf:Note' + } + ], + language: [ + { + label: 'English', + id: 'lang:eng' + } + ], + createdYear: [ + 1989 + ], + title: [ + 'Urbanism as a way of writing : Chicago urban sociology and Chicago urban literature, 1915-1945 / Carla Sofia Cappetti.' + ], + type: [ + 'nypl:Item' + ], + createdString: [ + '1989' + ], + creatorLiteral: [ + 'Cappetti, Carla Sofia.' + ], + materialType_packed: [ + 'resourcetypes:txt||Text' + ], + language_packed: [ + 'lang:eng||English' + ], + dateStartYear: [ + 1989 + ], + identifierV2: [ + { + type: 'nypl:Bnumber', + value: '1000077' + } + ], + carrierType_packed: [ + 'carriertypes:nc||volume' + ], + creator_sort: [ + 'cappetti, carla sofia.' + ], + issuance_packed: [ + 'urn:biblevel:m||monograph/item' + ], + updatedAt: 1523471203726, + publicationStatement: [ + '1989.' + ], + mediaType_packed: [ + 'mediatypes:n||unmediated' + ], + identifier: [ + 'urn:bnum:1000077' + ], + materialType: [ + { + label: 'Text', + id: 'resourcetypes:txt' + } + ], + carrierType: [ + { + label: 'volume', + id: 'carriertypes:nc' + } + ], + dateString: [ + '1989' + ], + title_sort: [ + 'urbanism as a way of writing : chicago urban sociology and chicago urban literat' + ], + mediaType: [ + { + label: 'unmediated', + id: 'mediatypes:n' + } + ], + titleDisplay: [ + 'Urbanism as a way of writing : Chicago urban sociology and Chicago urban literature, 1915-1945 / Carla Sofia Cappetti.' + ], + uri: 'cb1000077', + numItems: [ + 1 + ], + numAvailable: [ + 1 + ], + uris: [ + 'cb1000077', + 'cb1000077-ci1455504' + ], + issuance: [ + { + label: 'monograph/item', + id: 'urn:biblevel:m' + } + ], + items: [ + { + owner: [ + { + label: 'Columbia University Libraries', + id: 'orgs:0002' + } + ], + accessMessage_packed: [ + 'accessMessage:1||Use in library' + ], + identifier: [ + 'urn:barcode:1000020117' + ], + catalogItemType_packed: [ + 'catalogItemType:1||non-circ' + ], + accessMessage: [ + { + label: 'Use in library', + id: 'accessMessage:1' + } + ], + status_packed: [ + 'status:a||Available ' + ], + shelfMark: [ + 'LD1237.5D 1989 .C166' + ], + uri: 'ci1455504', + recapCustomerCode: [], + identifierV2: [ + { + type: 'bf:ShelfMark', + value: 'LD1237.5D 1989 .C166' + }, + { + type: 'bf:Barcode', + value: '1000020117' + } + ], + idBarcode: [ + '1000020117' + ], + owner_packed: [ + 'orgs:0002||Columbia University Libraries' + ], + requestable: [ + true + ], + catalogItemType: [ + { + label: 'non-circ', + id: 'catalogItemType:1' + } + ], + status: [ + { + label: 'Available ', + id: 'status:a' + } + ] + }, + { + owner: [ + { + label: 'Columbia University Libraries', + id: 'orgs:0002' + } + ], + accessMessage_packed: [ + 'accessMessage:1||Use in library' + ], + identifier: [ + 'urn:barcode:10000201179999' + ], + catalogItemType_packed: [ + 'catalogItemType:1||non-circ' + ], + accessMessage: [ + { + label: 'Use in library', + id: 'accessMessage:1' + } + ], + status_packed: [ + 'status:a||Available ' + ], + shelfMark: [ + 'LD1237.5D 1989 .C166 9999' + ], + uri: 'ci14555049999', + identifierV2: [ + { + type: 'bf:ShelfMark', + value: 'LD1237.5D 1989 .C166 9999' + }, + { + type: 'bf:Barcode', + value: '10000201179999' + } + ], + idBarcode: [ + '10000201179999' + ], + owner_packed: [ + 'orgs:0002||Columbia University Libraries' + ], + requestable: [ + true + ], + catalogItemType: [ + { + label: 'non-circ', + id: 'catalogItemType:1' + } + ], + status: [ + { + label: 'Available ', + id: 'status:a' + } + ] + } + ] + } + } + ] + } + } +} diff --git a/test/fixtures/query-0ac2d4be36677658e58b21fac9368305.json b/test/fixtures/query-0ac2d4be36677658e58b21fac9368305.json deleted file mode 100644 index 770eea7a..00000000 --- a/test/fixtures/query-0ac2d4be36677658e58b21fac9368305.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "body": { - "took": 30, - "timed_out": false, - "_shards": { - "total": 3, - "successful": 3, - "failed": 0 - }, - "hits": { - "total": 0, - "max_score": null, - "hits": [] - } - }, - "statusCode": 200 -} \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-1f8ce439dff513362111cf43901b9f10.json b/test/fixtures/scsb-by-barcode-1f8ce439dff513362111cf43901b9f10.json deleted file mode 100644 index 768707ea..00000000 --- a/test/fixtures/scsb-by-barcode-1f8ce439dff513362111cf43901b9f10.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "itemBarcode": "33433088646033", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433096425198", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433088646041", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433097964930", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-4a86f5100c2412aa6c747b6a4980a8b8.json b/test/fixtures/scsb-by-barcode-4a86f5100c2412aa6c747b6a4980a8b8.json deleted file mode 100644 index 81aa0cef..00000000 --- a/test/fixtures/scsb-by-barcode-4a86f5100c2412aa6c747b6a4980a8b8.json +++ /dev/null @@ -1,502 +0,0 @@ -[ - { - "itemBarcode": "33433136742412", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433136742438", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433136742420", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433136742404", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433130033313", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433130033339", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433130033297", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433130033305", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433130033321", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433119872095", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433119872087", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611091", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611075", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099610945", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611109", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611083", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099610952", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611133", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611117", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611141", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611125", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099612925", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611174", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611190", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611182", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611166", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064214", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064172", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063976", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063950", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064008", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063992", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064198", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063968", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064206", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064180", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063943", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063984", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240583", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240542", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240567", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240559", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240575", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240500", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240534", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240492", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240518", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240526", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240484", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433080028222", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078508037", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240468", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240476", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240419", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240435", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240450", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240401", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240427", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240443", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240351", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240377", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240393", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240344", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240369", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240385", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240310", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240336", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240302", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433079991612", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240328", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433080426707", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240278", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078639105", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240294", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240286", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240260", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240237", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240229", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240252", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240245", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240211", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240195", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078660671", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240203", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433080030616", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078658113", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078658105", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433081121117", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078530031", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078658063", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078658097", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078626128", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078658071", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078658089", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240187", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078658030", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078658055", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240179", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078658022", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078658048", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-4eb3fad2438146c7e687a865179ebc89.json b/test/fixtures/scsb-by-barcode-4eb3fad2438146c7e687a865179ebc89.json deleted file mode 100644 index 6c9ad16c..00000000 --- a/test/fixtures/scsb-by-barcode-4eb3fad2438146c7e687a865179ebc89.json +++ /dev/null @@ -1,502 +0,0 @@ -[ - { - "itemBarcode": "33433076133762", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133770", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133788", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133796", - "itemAvailabilityStatus": "Not Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133804", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133812", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133820", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133838", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133846", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133853", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133861", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133879", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133887", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133895", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133903", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133911", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133929", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133937", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133945", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133952", - "itemAvailabilityStatus": "Not Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133960", - "itemAvailabilityStatus": "Not Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133978", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133986", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076133994", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134000", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134018", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134026", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134034", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134042", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134059", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134067", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134075", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134083", - "itemAvailabilityStatus": "Not Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134091", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134109", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134117", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134125", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134133", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134141", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134158", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134166", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134174", - "itemAvailabilityStatus": "Not Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134182", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134190", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134208", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134216", - "itemAvailabilityStatus": "Not Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134224", - "itemAvailabilityStatus": "Not Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134232", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134240", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134257", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134265", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134273", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134281", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134299", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134307", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134315", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134323", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134331", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134349", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134356", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134364", - "itemAvailabilityStatus": "Not Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134372", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134380", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134398", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134406", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134414", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134422", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134430", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134448", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134455", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134463", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134471", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134489", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134497", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134505", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134513", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134521", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134539", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134547", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134554", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134562", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134570", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134588", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134596", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134604", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134612", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134620", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134638", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134646", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134653", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134661", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134679", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134687", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134695", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134703", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134711", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134729", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134737", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134745", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433076134752", - "itemAvailabilityStatus": "Available", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-68ce5c58a3564375af1881bf50830494.json b/test/fixtures/scsb-by-barcode-68ce5c58a3564375af1881bf50830494.json deleted file mode 100644 index e07b5de6..00000000 --- a/test/fixtures/scsb-by-barcode-68ce5c58a3564375af1881bf50830494.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "itemBarcode": "33433103848853", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-6d9bc4ccfec5900d645ec91611d139ee.json b/test/fixtures/scsb-by-barcode-6d9bc4ccfec5900d645ec91611d139ee.json deleted file mode 100644 index f1227a68..00000000 --- a/test/fixtures/scsb-by-barcode-6d9bc4ccfec5900d645ec91611d139ee.json +++ /dev/null @@ -1,502 +0,0 @@ -[ - { - "itemBarcode": "33433136742412", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433136742438", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433136742420", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433136742404", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433130033313", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433130033339", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433130033297", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433130033305", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433130033321", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433128200973", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433128200965", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433128201302", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433128201310", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433128201161", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433121911097", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433121911246", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433121911105", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433121911253", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433119892333", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433119872103", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433119872095", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433119855561", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433119892341", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433119892317", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433119855579", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433119872087", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433114102084", - "itemAvailabilityStatus": "Not Available", - "errorMessage": null - }, - { - "itemBarcode": "33433114101987", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433114102134", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433110762741", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433114102043", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433110762733", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433110762717", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433110762725", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433110762691", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433110762709", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433108528377", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433108528401", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433108528385", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433108528393", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433099611091", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611075", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099610945", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611109", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611083", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099610952", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611133", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611117", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611141", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611125", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099612925", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611174", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611190", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611182", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433099611166", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064214", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064172", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063976", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063950", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064008", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063992", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064198", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063968", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064206", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085064180", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063943", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433085063984", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240583", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240542", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240567", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240559", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240575", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240500", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240534", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240492", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240518", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240526", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240484", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433080028222", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433078508037", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240468", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240476", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240419", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240435", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240450", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240401", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240427", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240443", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240351", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240377", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240393", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240344", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240369", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240385", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240310", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240336", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240302", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433079991612", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433084240328", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433080426707", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-920faf2b789b32c7661692d9155560ff.json b/test/fixtures/scsb-by-barcode-920faf2b789b32c7661692d9155560ff.json deleted file mode 100644 index d71c5e24..00000000 --- a/test/fixtures/scsb-by-barcode-920faf2b789b32c7661692d9155560ff.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "itemBarcode": "33433057532339", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433067332555", - "itemAvailabilityStatus": "Available", - "errorMessage": null - }, - { - "itemBarcode": "33433057532081", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433067332548", - "itemAvailabilityStatus": "Available", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-9ca059b8418a8cc7ed13bafc739bffd4.json b/test/fixtures/scsb-by-barcode-9ca059b8418a8cc7ed13bafc739bffd4.json deleted file mode 100644 index 17e5c037..00000000 --- a/test/fixtures/scsb-by-barcode-9ca059b8418a8cc7ed13bafc739bffd4.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "itemBarcode": "33433001892276", - "itemAvailabilityStatus": "Available", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-a522b2198195ab55442d41136a902254.json b/test/fixtures/scsb-by-barcode-a522b2198195ab55442d41136a902254.json deleted file mode 100644 index c73122a1..00000000 --- a/test/fixtures/scsb-by-barcode-a522b2198195ab55442d41136a902254.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "itemBarcode": "33433080108636", - "itemAvailabilityStatus": "Available", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-aa04b0e8383fc73d48d88403eea37e2c.json b/test/fixtures/scsb-by-barcode-aa04b0e8383fc73d48d88403eea37e2c.json deleted file mode 100644 index e14999ce..00000000 --- a/test/fixtures/scsb-by-barcode-aa04b0e8383fc73d48d88403eea37e2c.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "itemBarcode": "HS65164695", - "itemAvailabilityStatus": "Available", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-b4ab79b5bce17604bea7d6e8569a05d0.json b/test/fixtures/scsb-by-barcode-b4ab79b5bce17604bea7d6e8569a05d0.json deleted file mode 100644 index 188722c4..00000000 --- a/test/fixtures/scsb-by-barcode-b4ab79b5bce17604bea7d6e8569a05d0.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "itemBarcode": "33433102812199", - "itemAvailabilityStatus": "Available", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-d9e8022a9e991935d867b23b15546742.json b/test/fixtures/scsb-by-barcode-d9e8022a9e991935d867b23b15546742.json deleted file mode 100644 index 5690b73e..00000000 --- a/test/fixtures/scsb-by-barcode-d9e8022a9e991935d867b23b15546742.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "itemBarcode": "33433065651741", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433060936147", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-de2b279b21a808f0b0ca151f03968031.json b/test/fixtures/scsb-by-barcode-de2b279b21a808f0b0ca151f03968031.json deleted file mode 100644 index 9f5df717..00000000 --- a/test/fixtures/scsb-by-barcode-de2b279b21a808f0b0ca151f03968031.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "itemBarcode": "33433035187214", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433015873411", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - }, - { - "itemBarcode": "33433034124614", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-f7449c752a123dd05ff2d438b7def61e.json b/test/fixtures/scsb-by-barcode-f7449c752a123dd05ff2d438b7def61e.json deleted file mode 100644 index 4057146e..00000000 --- a/test/fixtures/scsb-by-barcode-f7449c752a123dd05ff2d438b7def61e.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "itemBarcode": "33433097964930", - "itemAvailabilityStatus": "Item Barcode doesn't exist in SCSB database.", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/fixtures/scsb-by-barcode-ff5b8e7ea9a28bf4a8c8409597bbf6df.json b/test/fixtures/scsb-by-barcode-ff5b8e7ea9a28bf4a8c8409597bbf6df.json deleted file mode 100644 index 3041df63..00000000 --- a/test/fixtures/scsb-by-barcode-ff5b8e7ea9a28bf4a8c8409597bbf6df.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "itemBarcode": "33433114102084", - "itemAvailabilityStatus": "Not Available", - "errorMessage": null - } -] \ No newline at end of file diff --git a/test/location_label_updater.test.js b/test/location_label_updater.test.js index c9576596..f7495075 100644 --- a/test/location_label_updater.test.js +++ b/test/location_label_updater.test.js @@ -10,7 +10,7 @@ describe('Location LabelUpdater', function () { _id: 'b10980129', _source: { items: [{ - holdingLocation: [{ id: 'mai87', label: 'Some disgusting room' }] + holdingLocation: [{ id: 'mai82', label: 'Some disgusting room' }] }] } }] @@ -18,7 +18,7 @@ describe('Location LabelUpdater', function () { } const updatedResponse = new LocationLabelUpdater(fakeESResponse).responseWithUpdatedLabels() - expect(updatedResponse.hits.hits[0]._source.items[0].holdingLocation[0].label).to.equal('Schwarzman Building - Periodicals and Microforms Room 119') + expect(updatedResponse.hits.hits[0]._source.items[0].holdingLocation[0].label).to.equal('Schwarzman Building - Microforms Room 315') }) it('will overwrite an ElasticSearch Response\'s holdings record location label', function () { diff --git a/test/requestability_resolver.test.js b/test/requestability_resolver.test.js index 0a348373..ccd50855 100644 --- a/test/requestability_resolver.test.js +++ b/test/requestability_resolver.test.js @@ -3,6 +3,7 @@ const elasticSearchResponse = require('./fixtures/elastic_search_response.js') const specRequestableElasticSearchResponse = require('./fixtures/specRequestable-es-response') const eddElasticSearchResponse = require('./fixtures/edd_elastic_search_response') const noBarcodeResponse = require('./fixtures/no_barcode_es_response') +const noRecapResponse = require('./fixtures/no_recap_response') describe('RequestabilityResolver', () => { describe('fixItemRequestability', function () { @@ -203,4 +204,22 @@ describe('RequestabilityResolver', () => { expect(nonEddItem.eddRequestable).to.equal(false) }) }) + + describe('Missing recapCustomerCode', function () { + const response = noRecapResponse.fakeElasticSearchResponseNyplItem() + const resolved = RequestabilityResolver.fixItemRequestability(response) + it('marks edd and physical requestability correctly', function () { + const items = resolved.hits.hits[0]._source.items + const firstItem = items.find((item) => { + return item.uri === 'i102836649' + }) + const secondItem = items.find((item) => { + return item.uri === 'i102836659' + }) + expect(firstItem.physRequestable).to.equal(true) + expect(firstItem.eddRequestable).to.equal(true) + expect(secondItem.physRequestable).to.equal(false) + expect(secondItem.eddRequestable).to.equal(false) + }) + }) })