File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,20 @@ define([
6161
6262 it ( 'check on failed status' , function ( ) {
6363 var messageContainer = jasmine . createSpyObj ( 'globalMessageList' , [ 'addErrorMessage' ] ) ;
64-
64+ let messageObject = {
65+ message : 'You are not authorized to access this resource.'
66+ } ;
6567 spyOn ( model , 'redirectTo' ) . and . callFake ( function ( ) { } ) ;
6668 model . process ( {
6769 status : 401 ,
6870 responseText : ''
6971 } , messageContainer ) ;
70- expect ( mocks [ 'mage/url' ] . build )
71- . toHaveBeenCalled ( ) ;
72+ expect ( messageContainer . addErrorMessage )
73+ . toHaveBeenCalledWith ( messageObject ) ;
74+ setTimeout ( function ( ) {
75+ expect ( mocks [ 'mage/url' ] . build ) . toHaveBeenCalled ( ) ;
76+ done ( ) ;
77+ } , 2000 ) ;
7278 } ) ;
7379 } ) ;
7480 } ) ;
You can’t perform that action at this time.
0 commit comments