fix api doc
This commit is contained in:
@@ -12,6 +12,15 @@ describe('GET /health', () => {
|
||||
expect(typeof res.body.timestamp).toBe('string')
|
||||
})
|
||||
|
||||
it('GET /api/v1 returns the API entrypoint', async () => {
|
||||
const res = await request(app).get('/api/v1')
|
||||
expect(res.status).toBe(200)
|
||||
expect(res.body.name).toBe('rentaldrivego-api')
|
||||
expect(res.body.baseUrl).toBe('/api/v1')
|
||||
expect(res.body.docs).toBe('/api/v1/docs')
|
||||
expect(res.body.openApi).toBe('/api/v1/openapi.json')
|
||||
})
|
||||
|
||||
it('GET /api/v1/docs returns route index', async () => {
|
||||
const res = await request(app).get('/api/v1/docs')
|
||||
expect(res.status).toBe(200)
|
||||
|
||||
Reference in New Issue
Block a user