feat: add public listing catalog boundary
This commit is contained in:
@@ -141,6 +141,10 @@ test('searches public listings with pagination and hides sold items by default',
|
||||
assert.equal(visible.total, 1);
|
||||
assert.equal(visible.items.length, 1);
|
||||
assert.equal(visible.items[0].status, 'PENDING');
|
||||
assert.equal(
|
||||
(await listingRepository.findPublicById(visible.items[0].id))?.id,
|
||||
visible.items[0].id,
|
||||
);
|
||||
|
||||
await database.db
|
||||
.update(listings)
|
||||
@@ -153,6 +157,7 @@ test('searches public listings with pagination and hides sold items by default',
|
||||
|
||||
const hidden = await listingRepository.searchPublic({ page: 1, limit: 10 });
|
||||
assert.equal(hidden.total, 0);
|
||||
assert.equal(await listingRepository.findPublicById(visible.items[0].id), null);
|
||||
|
||||
const included = await listingRepository.searchPublic({
|
||||
page: 1,
|
||||
|
||||
Reference in New Issue
Block a user