@@ -98,20 +98,6 @@ define([
98
98
99
99
describe ( 'Magento_Checkout/js/model/cart/totals-processor/default' , function ( ) {
100
100
101
- it ( 'estimateTotals if data was cached' , function ( ) {
102
- spyOn ( mocks [ 'Magento_Checkout/js/model/cart/cache' ] , 'isChanged' ) . and . returnValue ( false ) ;
103
- spyOn ( mocks [ 'Magento_Customer/js/customer-data' ] , 'get' ) . and . returnValue (
104
- ko . observable ( {
105
- 'data_id' : 1
106
- } )
107
- ) ;
108
- spyOn ( mocks [ 'Magento_Checkout/js/model/cart/cache' ] , 'get' ) . and . returnValue ( totals ) ;
109
- spyOn ( mocks [ 'mage/storage' ] , 'post' ) ;
110
- expect ( defaultProcessor . estimateTotals ( address ) ) . toBeUndefined ( ) ;
111
- expect ( mocks [ 'Magento_Checkout/js/model/quote' ] . setTotals ) . toHaveBeenCalledWith ( totals ) ;
112
- expect ( mocks [ 'mage/storage' ] . post ) . not . toHaveBeenCalled ( ) ;
113
- } ) ;
114
-
115
101
it ( 'estimateTotals if data wasn\'t cached and request was successfully sent' , function ( ) {
116
102
var deferral = new $ . Deferred ( ) ;
117
103
@@ -133,8 +119,6 @@ define([
133
119
expect ( mocks [ 'Magento_Checkout/js/model/totals' ] . isLoading . calls . argsFor ( 0 ) [ 0 ] ) . toBe ( true ) ;
134
120
expect ( mocks [ 'Magento_Checkout/js/model/totals' ] . isLoading . calls . argsFor ( 1 ) [ 0 ] ) . toBe ( false ) ;
135
121
expect ( mocks [ 'mage/storage' ] . post ) . toHaveBeenCalled ( ) ;
136
- expect ( mocks [ 'Magento_Checkout/js/model/cart/cache' ] . get ) . not . toHaveBeenCalled ( ) ;
137
- expect ( mocks [ 'Magento_Checkout/js/model/cart/cache' ] . set ) . toHaveBeenCalledWith ( 'cart-data' , data ) ;
138
122
} ) ;
139
123
140
124
it ( 'estimateTotals if data wasn\'t cached and request returns error' , function ( ) {
@@ -154,7 +138,6 @@ define([
154
138
expect ( mocks [ 'Magento_Checkout/js/model/totals' ] . isLoading . calls . argsFor ( 0 ) [ 0 ] ) . toBe ( true ) ;
155
139
expect ( mocks [ 'Magento_Checkout/js/model/totals' ] . isLoading . calls . argsFor ( 1 ) [ 0 ] ) . toBe ( false ) ;
156
140
expect ( mocks [ 'mage/storage' ] . post ) . toHaveBeenCalled ( ) ;
157
- expect ( mocks [ 'Magento_Checkout/js/model/cart/cache' ] . get ) . not . toHaveBeenCalled ( ) ;
158
141
expect ( mocks [ 'Magento_Checkout/js/model/error-processor' ] . process ) . toHaveBeenCalledWith ( 'Error Message' ) ;
159
142
} ) ;
160
143
} ) ;
0 commit comments