From 773a7324bcbf86271a68e6a2e7a75e3aa6237ae6 Mon Sep 17 00:00:00 2001 From: Liliana Date: Fri, 26 Apr 2024 09:40:55 +0200 Subject: [PATCH] test for "/history/questions" (???) --- gatewayservice/gateway-service.test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gatewayservice/gateway-service.test.js b/gatewayservice/gateway-service.test.js index 56eeb124..e0b69d73 100644 --- a/gatewayservice/gateway-service.test.js +++ b/gatewayservice/gateway-service.test.js @@ -37,4 +37,20 @@ describe('Gateway Service', () => { expect(response.statusCode).toBe(200); expect(response.body.userId).toBe('mockedUserId'); }); + + // Test /history/games/:username + + + // Test /history/questions + it('should forward add user request to user service', async () => { + await request(app).post('/login') + .send({ username: 'testuser', password: 'testpassword' }); + + const response = await request(app) + .get('/history/questions'); + + expect(response.statusCode).toBe(200); + }); + + }); \ No newline at end of file