Skip to content

Commit c3e4b04

Browse files
author
Timon de Groot
committed
Add test for cart data mutations/estimation call
1 parent 9a249e9 commit c3e4b04

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
@@ -150,5 +150,10 @@ define([
150150
});
151151
expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals).toHaveBeenCalled();
152152
});
153+
154+
it('test subscribe when cart data was changed', function () {
155+
mocks['Magento_Customer/js/customer-data'].get('cart')({ data_id: 2 });
156+
expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals).toHaveBeenCalled();
157+
});
153158
});
154159
});

0 commit comments

Comments
 (0)