Skip to content

Commit 02c018d

Browse files
committed
Add tests for multiselect with value 'undefined'
1 parent 9e263a8 commit 02c018d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/element/multiselect.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ define([
5252
expect(obj.source.set).toHaveBeenCalledWith(dataScope + '-prepared-for-send', '');
5353
});
5454

55+
it('Check method call with undefined as parameter.', function () {
56+
57+
expect(obj.setPrepareToSendData(undefined)).toBeUndefined();
58+
expect(obj.source.set).toHaveBeenCalledWith(dataScope + '-prepared-for-send', '');
59+
});
60+
5561
it('Check method call with array with data as parameter.', function () {
5662
expect(obj.setPrepareToSendData(['1', '2', '3'])).toBeUndefined();
5763
expect(obj.source.set).toHaveBeenCalledWith(dataScope + '-prepared-for-send', ['1', '2', '3']);

0 commit comments

Comments
 (0)