From 9936241815b33da90564d4704ce7c5a09046c730 Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Wed, 29 Mar 2023 23:46:25 +0500 Subject: [PATCH] chore: fix failing specs --- api/src/routes/api/spec/web.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/src/routes/api/spec/web.spec.ts b/api/src/routes/api/spec/web.spec.ts index e1e98cf..968bfc5 100644 --- a/api/src/routes/api/spec/web.spec.ts +++ b/api/src/routes/api/spec/web.spec.ts @@ -115,6 +115,8 @@ describe('web', () => { password: user.password }) .expect(429) + + expect(res.text).toContain('Too Many Requests!') }) it('should respond with too many requests when attempting with invalid credentials for different users but with same ip too many times', async () => { @@ -150,6 +152,8 @@ describe('web', () => { password: user.password }) .expect(429) + + expect(res.text).toContain('Too Many Requests!') }) it('should respond with Bad Request if CSRF Token is not present', async () => { @@ -189,6 +193,7 @@ describe('web', () => { let authCookies: string beforeAll(async () => { + await deleteDocumentsFromLimitersCollections() ;({ csrfToken } = await getCSRF(app)) await userController.createUser(user) @@ -280,3 +285,12 @@ const extractCSRF = (text: string) => /