aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-11-04 18:34:14 -0500
committerTimmy Willison <timmywillisn@gmail.com>2015-11-05 17:41:49 -0500
commit79fc806e8500372a2278795c068d039ee287535f (patch)
tree8854f780b465d1fdabcdc98c83ca2327a6f79144 /test
parente05c63e17a037d550e7dde5d805ee5c4214ee44b (diff)
downloadjquery-79fc806e8500372a2278795c068d039ee287535f.tar.gz
jquery-79fc806e8500372a2278795c068d039ee287535f.zip
Attributes: return empty array for select-multiple with no values
Fixes gh-2562 Close gh-2689
Diffstat (limited to 'test')
-rw-r--r--test/unit/attributes.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 9ea29a105..9bf287688 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -903,10 +903,10 @@ QUnit.test( "val() with non-matching values on dropdown list", function( assert
var select6 = jQuery( "<select multiple id=\"select6\"><option value=\"1\">A</option><option value=\"2\">B</option></select>" ).appendTo( "#form" );
jQuery( select6 ).val( "nothing" );
- assert.equal( jQuery( select6 ).val(), null, "Non-matching set (single value) on select-multiple" );
+ assert.deepEqual( jQuery( select6 ).val(), [], "Non-matching set (single value) on select-multiple" );
jQuery( select6 ).val( [ "nothing1", "nothing2" ] );
- assert.equal( jQuery( select6 ).val(), null, "Non-matching set (array of values) on select-multiple" );
+ assert.deepEqual( jQuery( select6 ).val(), [], "Non-matching set (array of values) on select-multiple" );
select6.remove();
} );