From 7a6694ed6c3ca8bcb44b01171e5708c572155f13 Mon Sep 17 00:00:00 2001 From: Francisco de la Vega Date: Mon, 27 Apr 2020 18:42:32 +0200 Subject: [PATCH] Update elasticsearch tests --- test/lib/elastic_indexes.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/lib/elastic_indexes.js b/test/lib/elastic_indexes.js index 390bfaea..49b77120 100644 --- a/test/lib/elastic_indexes.js +++ b/test/lib/elastic_indexes.js @@ -177,7 +177,6 @@ describe("Elasticsearch indexes tests", function () { } }, { index: 'offerings', - type: 'offerings', sort: [ '{"lastUpdate":{"order":"desc"}}' ], from: undefined, size: undefined, @@ -197,7 +196,6 @@ describe("Elasticsearch indexes tests", function () { pageSize: 5, }, { index: 'offerings', - type: 'offerings', sort: [ '{"lastUpdate":{"order":"desc"}}' ], from: 10, size: 5, @@ -218,7 +216,6 @@ describe("Elasticsearch indexes tests", function () { pageSize: 5, }, { index: 'offerings', - type: 'offerings', sort: [ '{"lastUpdate":{"order":"desc"}}' ], from: 10, size: 5, @@ -238,7 +235,6 @@ describe("Elasticsearch indexes tests", function () { }; let expQuery = { index: 'offerings', - type: 'offerings', sort: [ '{"lastUpdate":{"order":"desc"}}' ], from: undefined, size: undefined, @@ -285,7 +281,6 @@ describe("Elasticsearch indexes tests", function () { let expQuery = { index: 'products', - type: 'products', sort: [ '{"lastUpdate":{"order":"desc"}}' ], from: undefined, size: undefined, @@ -297,19 +292,18 @@ describe("Elasticsearch indexes tests", function () { expect(clientSpy.search).toHaveBeenCalledWith(expQuery); expect(clientSpy.exists).toHaveBeenCalledWith({ index: 'offerings', - type: 'offerings', id: '3' }); if (!exists) { expect(clientSpy.create).toHaveBeenCalledWith({ index: 'offerings', - type: 'offerings', id: '3', body: { id: 'offering:3', originalId: '3', sortedId: '000000000003', - catalog: '000000000002', body: [ 'offer', 'description' ], + catalog: '000000000002', + body: 'offer description', userId: '1441a7909c087dbbe7ce59881b9df8b9', lastUpdate: 1549015200000, productSpecification: '000000000001', @@ -321,14 +315,14 @@ describe("Elasticsearch indexes tests", function () { } else { expect(clientSpy.update).toHaveBeenCalledWith({ index: 'offerings', - type: 'offerings', id: '3', body: { doc: { id: 'offering:3', originalId: '3', sortedId: '000000000003', - catalog: '000000000002', body: [ 'offer', 'description' ], + catalog: '000000000002', + body: 'offer description', userId: '1441a7909c087dbbe7ce59881b9df8b9', lastUpdate: 1549015200000, productSpecification: '000000000001',