Skip to content
Permalink
Browse files
added a users test
  • Loading branch information
skondram committed Nov 27, 2021
1 parent 216332d commit f19a00536c9c83b4dec61766f96c300a28db43a8
Showing 1 changed file with 10 additions and 1 deletion.
@@ -1,6 +1,7 @@
const request = require('supertest')
const app = require('../app')


describe('Post new user', () => {
it('should create a new user', async () => {
const res = await request(app.callback())
@@ -13,4 +14,12 @@ describe('Post new user', () => {
expect(res.statusCode).toEqual(201)
expect(res.body).toHaveProperty('created', true)
})
});
});

describe('Get all users', () => {
it('should show all users', async () => {
const res = await request(app.callback())
.get('/api/v1/users')
expect(res.statusCode).toEqual(200)
})
});

0 comments on commit f19a005

Please sign in to comment.