Skip to content

Commit 4787cf1

Browse files
Timon de Groottdgroot
authored andcommitted
Add test for cart data mutations/estimation call
1 parent b23c790 commit 4787cf1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,10 @@ define([
143143
});
144144
expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals).toHaveBeenCalled();
145145
});
146+
147+
it('test subscribe when cart data was changed', function () {
148+
mocks['Magento_Customer/js/customer-data'].get('cart')({ data_id: 2 });
149+
expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals).toHaveBeenCalled();
150+
});
146151
});
147152
});

0 commit comments

Comments
 (0)