We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b284600 commit c091a25Copy full SHA for c091a25
dev/tests/js/jasmine/tests/lib/mage/misc.test.js
@@ -5,8 +5,9 @@
5
6
define([
7
'mageUtils',
8
- 'moment'
9
-], function (utils, moment) {
+ 'moment',
+ 'jquery'
10
+], function (utils, moment, $) {
11
'use strict';
12
13
describe('mageUtils', function () {
@@ -681,5 +682,22 @@ define([
681
682
}
683
684
});
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
702
703
0 commit comments