u
This commit is contained in:
@@ -90,8 +90,19 @@ describe('store.category', () => {
|
||||
assert.equal(list[0].sku, art.sku);
|
||||
assert.equal(list[0].name, 'Listed');
|
||||
assert.equal(list[0].parentArticleId, null);
|
||||
assert.equal(list[0].smallThumbW, null);
|
||||
assert.equal(list[0].smallThumbH, null);
|
||||
assert.equal(list[0].smallThumbBinary, null);
|
||||
assert(Array.isArray(list[0].articlewarehousesummary));
|
||||
assert(Array.isArray(list[0].warehouses));
|
||||
|
||||
await store.article.addImage(tenant.googleAuthId, art.sku, await makePng());
|
||||
const listWithImg = await store.category.getCategoryArticles(tenant.googleAuthId, cat.id);
|
||||
assert.equal(listWithImg.length, 1);
|
||||
assert.ok(listWithImg[0].smallThumbW > 0);
|
||||
assert.ok(listWithImg[0].smallThumbH > 0);
|
||||
assert.equal(typeof listWithImg[0].smallThumbBinary, 'string');
|
||||
assert.ok(listWithImg[0].smallThumbBinary.length > 0);
|
||||
});
|
||||
|
||||
it('rejects a category of another company', async () => {
|
||||
|
||||
Reference in New Issue
Block a user