diff options
author | Daniel Nill <daniellnill@gmail.com> | 2015-08-06 19:49:14 -0700 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2015-09-07 22:45:23 +0200 |
commit | 3d7ce0a65f0707ff01a851822e57ba80adcff075 (patch) | |
tree | 4d5f6555af7e384e2e3e310809d0fb00b3840e8e /test/unit/serialize.js | |
parent | 835e9218beef8f0c559da314fac01cb85dacb740 (diff) | |
download | jquery-3d7ce0a65f0707ff01a851822e57ba80adcff075.tar.gz jquery-3d7ce0a65f0707ff01a851822e57ba80adcff075.zip |
Serialize: Handle arrays with null values
Closes gh-2436
Diffstat (limited to 'test/unit/serialize.js')
-rw-r--r-- | test/unit/serialize.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/serialize.js b/test/unit/serialize.js index 047861530..a64593603 100644 --- a/test/unit/serialize.js +++ b/test/unit/serialize.js @@ -1,7 +1,7 @@ QUnit.module( "serialize", { teardown: moduleTeardown } ); QUnit.test( "jQuery.param()", function( assert ) { - assert.expect( 22 ); + assert.expect( 23 ); var params, settings; @@ -77,6 +77,9 @@ QUnit.test( "jQuery.param()", function( assert ) { params = { "test": { "length": 3, "foo": "bar" } }; assert.equal( jQuery.param( params, false ), "test%5Blength%5D=3&test%5Bfoo%5D=bar", "Sub-object with a length property" ); + params = { "test": [ 1, 2, null ] }; + assert.equal( jQuery.param( params, false ), "test%5B%5D=1&test%5B%5D=2&test%5B%5D=", "object with array property with null value" ); + if ( jQuery.ajaxSettings === settings ) { delete jQuery.ajaxSettings; } else { |