Skip to content
Permalink
f6341cf5cd
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
33 lines (30 sloc) 942 Bytes
const request = require('supertest')
const app = require('../app')
describe('Post new application', () => {
it('should create a new application', async () => {
const res = await request(app.callback())
.post('/api/v1/applications/all')
.send({
firstName: 'random_11223',
lastName: 'guy_1222',
email: 'random@example.com',
address: '32 Mane Road'
})
expect(res.statusCode).toEqual(201)
expect(res.body).toHaveProperty('created', true)
})
});
describe('Get all applications', () => {
it('should show all applications', async () => {
const res = await request(app.callback())
.get('/api/v1/applications/all')
expect(res.statusCode).toEqual(200)
})
});
describe('Get all users', () => {
it('should show all users', async () => {
const res = await request(app.callback())
.get('/api/v1/users')
expect(res.statusCode).toEqual(401)
})
});