From ca74761fce180c7dc3d2ff4222429104e50a8aa4 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Tue, 16 Feb 2021 15:13:43 +0100 Subject: [PATCH] Add a simple sanity test to the search-backend plugin. Signed-off-by: Eric Peterson --- plugins/search-backend/src/service/router.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/search-backend/src/service/router.test.ts b/plugins/search-backend/src/service/router.test.ts index 0aaeafa379..ba7032eb93 100644 --- a/plugins/search-backend/src/service/router.test.ts +++ b/plugins/search-backend/src/service/router.test.ts @@ -34,12 +34,12 @@ describe('createRouter', () => { jest.resetAllMocks(); }); - describe('GET /health', () => { - it('returns ok', async () => { - const response = await request(app).get('/health'); + describe('GET /query', () => { + it('returns empty results array', async () => { + const response = await request(app).get('/query'); expect(response.status).toEqual(200); - expect(response.body).toEqual({ status: 'ok' }); + expect(response.body).toMatchObject({ results: [] }); }); }); });