This commit is contained in:
seb
2026-10-20 23:16:47 +02:00
parent bcefd81af7
commit 813e7c89b8
6 changed files with 24 additions and 3 deletions

View File

@@ -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 () => {