fix(medusa): Update line item adjustments upon cart discount removal (#2751)

**What**

When a discount is deleted from a cart, the line item adjustments must be refreshed. Now, the cart service `removeDiscount` includes updating the adjustments.

**Tests**

**Add a new integration test which:**
- create a cart with a discount 
- add a line item
- validate the adjustments
- remove the discount
- check that the adjustments are not present anymore

**Update unit tests**
The actual tests cases now check that the adjustments repository is called when needed

FIXES CORE-890
This commit is contained in:
Adrien de Peretti
2022-12-12 10:53:40 +01:00
committed by GitHub
parent 72f70bc789
commit d68e81fb3d
4 changed files with 185 additions and 18 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix(medusa): Should update the adjustments upon cart discount removal