mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
test new queryParamToBool helper
This commit is contained in:
parent
d7f1dd686c
commit
64c9c8a0e8
1 changed files with 15 additions and 3 deletions
|
@ -384,7 +384,7 @@ describe('Collection', () => {
|
|||
})
|
||||
|
||||
test('shoud get collection\'s filters using withFilters parameter', async () => {
|
||||
const response = await request(app)
|
||||
let response = await request(app)
|
||||
.get('/api/collections?withFilters=true')
|
||||
.expect(200)
|
||||
|
||||
|
@ -393,6 +393,18 @@ describe('Collection', () => {
|
|||
expect(response.body[0].filters.length).toBe(1)
|
||||
expect(response.body[0].filters[0].tags.length).toBe(1)
|
||||
expect(response.body[0].filters[0].tags[0]).toBe('test')
|
||||
|
||||
response = await request(app)
|
||||
.get('/api/collections')
|
||||
.expect(200)
|
||||
expect(response.body[0].filters).toBeUndefined()
|
||||
|
||||
|
||||
response = await request(app)
|
||||
.get('/api/collections?withFilters=false')
|
||||
.expect(200)
|
||||
expect(response.body[0].filters).toBeUndefined()
|
||||
|
||||
})
|
||||
|
||||
test('should get collection events', async () => {
|
||||
|
|
Loading…
Reference in a new issue