mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 14:44:31 +00:00
fix test
This commit is contained in:
parent
fc2ee1dd16
commit
17217e5dfe
@ -123,19 +123,19 @@ describe('Field selection API', () => {
|
||||
expect(body.data).toEqual(getProductDataFields(['name']));
|
||||
});
|
||||
|
||||
test('Non existing fields are ignored', async () => {
|
||||
const { body } = await getProductAPI('fakeField');
|
||||
expect(body.data).toEqual(getProductDataFields([]));
|
||||
test('Non existing fields throw error', async () => {
|
||||
const { statusCode } = await getProductAPI('fakeField');
|
||||
expect(statusCode).toEqual(400);
|
||||
});
|
||||
|
||||
test('Private fields are ignored', async () => {
|
||||
const { body } = await getProductAPI('privateField');
|
||||
expect(body.data).toEqual(getProductDataFields([]));
|
||||
test('Private fields throw error', async () => {
|
||||
const { statusCode } = await getProductAPI('privateField');
|
||||
expect(statusCode).toEqual(400);
|
||||
});
|
||||
|
||||
test('Password fields are ignored', async () => {
|
||||
const { body } = await getProductAPI('password');
|
||||
expect(body.data).toEqual(getProductDataFields([]));
|
||||
test('Password fields throw error', async () => {
|
||||
const { statusCode } = await getProductAPI('password');
|
||||
expect(statusCode).toEqual(400);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user