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:
+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