mirror of
https://github.com/strapi/strapi.git
synced 2025-10-29 17:04:13 +00:00
add test
This commit is contained in:
parent
26753c2c6f
commit
e5eb30b2a3
@ -154,6 +154,17 @@ describe('Core API - Validate', () => {
|
||||
|
||||
expect(res.status).toEqual(400);
|
||||
});
|
||||
|
||||
it.each([
|
||||
['at root', { id: {} }],
|
||||
['nested known keys', { id: { $and: { $eq: {}, $contains: {} } } }],
|
||||
['nested unknown keys', { id: { foo: { foo: {} } } }],
|
||||
])('Empty objects are accepted but sanitized out: %s : %s', async (label, filters) => {
|
||||
const res = await rq.get('/api/documents', { qs: { filters } });
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
checkAPIResultLength(res, documentsLength());
|
||||
});
|
||||
});
|
||||
|
||||
describe('Scalar', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user