Browse Source

fix: auth.test.ts

pull/5444/head
Wing-Kam Wong 2 years ago
parent
commit
906ea55a74
  1. 6
      packages/nocodb-nest/tests/unit/rest/tests/auth.test.ts

6
packages/nocodb-nest/tests/unit/rest/tests/auth.test.ts

@ -68,19 +68,19 @@ function authTests() {
expect(token).to.be.a('string'); expect(token).to.be.a('string');
}); });
it('Signin without email and password', async () => { it('Signup without email and password', async () => {
await request(context.app) await request(context.app)
.post('/api/v1/auth/user/signin') .post('/api/v1/auth/user/signin')
// pass empty data in await request // pass empty data in await request
.send({}) .send({})
.expect(401) .expect(400);
}); });
it('Signin with invalid credentials', async () => { it('Signin with invalid credentials', async () => {
await request(context.app) await request(context.app)
.post('/api/v1/auth/user/signin') .post('/api/v1/auth/user/signin')
.send({ email: 'abc@abc.com', password: defaultUserArgs.password }) .send({ email: 'abc@abc.com', password: defaultUserArgs.password })
.expect(400) .expect(400);
}); });
it('Signin with invalid password', async () => { it('Signin with invalid password', async () => {

Loading…
Cancel
Save