Skip to content

Commit

Permalink
Fix api tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebodin committed Mar 15, 2023
1 parent 8819379 commit 9295b52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/admin/server/tests/admin-user.test.api.js
Expand Up @@ -379,7 +379,7 @@ describe('Admin User CRUD (api)', () => {
method: 'GET',
qs: {
filters: {
email: testData.user.email,
username: testData.user.username,
},
},
});
Expand Down
5 changes: 4 additions & 1 deletion packages/core/strapi/tests/api/fields/fields.test.api.js
Expand Up @@ -16,7 +16,10 @@ const data = { product: [] };

const getProductDataFields = (fields) => {
return data.product.map((product) => {
return { ...product, attributes: _.pick(product.attributes, fields) };
return {
...product,
attributes: fields.length > 0 ? _.pick(product.attributes, fields) : product.attributes,
};
});
};

Expand Down

0 comments on commit 9295b52

Please sign in to comment.