Skip to content

Commit c091a25

Browse files
MC-41575: Magento Catalog Frontend Action Synchronizer 400 causes JS unhandled error
1 parent b284600 commit c091a25

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

dev/tests/js/jasmine/tests/lib/mage/misc.test.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
define([
77
'mageUtils',
8-
'moment'
9-
], function (utils, moment) {
8+
'moment',
9+
'jquery'
10+
], function (utils, moment, $) {
1011
'use strict';
1112

1213
describe('mageUtils', function () {
@@ -681,5 +682,22 @@ define([
681682
}
682683
}
683684
});
685+
686+
it('Check ajaxSubmit method', function () {
687+
var options = {
688+
data: {}
689+
},
690+
config = {
691+
ajaxSaveType: 'default'
692+
},
693+
d = new $.Deferred();
694+
695+
spyOn($, 'ajax').and.callFake(function () {
696+
d.reject();
697+
698+
return d.promise();
699+
});
700+
expect(utils.ajaxSubmit(options, config)).toBeDefined();
701+
});
684702
});
685703
});

0 commit comments

Comments
 (0)