diff --git a/tests/routes/api/auth/index.js b/tests/routes/api/auth/index.js index 6bb46b2af..d01ddd8c7 100644 --- a/tests/routes/api/auth/index.js +++ b/tests/routes/api/auth/index.js @@ -31,7 +31,7 @@ describe('/api/v1/auth/local', () => { it('should send back the user on a successful login', () => { return chai.request(app) .post('/api/v1/auth/local') - .field('_csrf', req.csrfToken()) + .field('_csrf', 'generate csrf token') <--- we need to generate the csrf token that needs to be send from the request .send({email: 'maria@gmail.com', password: 'password!'}) .catch((res) => { expect(res).to.have.status(200);