fix(product): Return updated collections (#12354)
Collection updates without a `products` payload were not returned from the service layer due to an incorrect early return Fixes SUP-1488
This commit is contained in:
1 parent
f25a4a5e34
commit
77c3023200
3 files changed
+64
-45
No files matched your search
+16
@@ -384,6 +384,22 @@ moduleIntegrationTestRunner<IProductModuleService>({
|
||||
)
|
||||
})
|
||||
|
||||
it("should respond with collections when products are updated", async () => {
|
||||
const collections = await service.updateProductCollections(
|
||||
collectionId,
|
||||
{
|
||||
title: "Updated Collection",
|
||||
}
|
||||
)
|
||||
|
||||
expect(collections).toEqual(
|
||||
expect.objectContaining({
|
||||
id: collectionId,
|
||||
title: "Updated Collection",
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
it("should throw an error when an id does not exist", async () => {
|
||||
let error
|
||||
|
||||
|
||||
Reference in new issue
Block a user