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:
Oli Juhl
2025-05-05 14:41:45 +00:00
committed by GitHub
parent f25a4a5e34
commit 77c3023200
3 changed files with 64 additions and 45 deletions
@@ -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