diff options
author | Felix Nagel <info@felixnagel.com> | 2016-12-11 23:10:26 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2017-01-21 13:49:35 +0100 |
commit | de20614bd7332b740c6ec095e0e5c48c2f97c8bf (patch) | |
tree | 289044f7f0b09df38268b14d31620cadbdad9dc3 /tests | |
parent | b49d12d088268d5ae5aaaa4dc43f092798c72e98 (diff) | |
download | jquery-ui-de20614bd7332b740c6ec095e0e5c48c2f97c8bf.tar.gz jquery-ui-de20614bd7332b740c6ec095e0e5c48c2f97c8bf.zip |
Calendar: Make select and change event pass the current value
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/calendar/events.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/unit/calendar/events.js b/tests/unit/calendar/events.js index 59508cb8a..6dc2e5eef 100644 --- a/tests/unit/calendar/events.js +++ b/tests/unit/calendar/events.js @@ -12,12 +12,12 @@ QUnit.module( "calendar: events", { } ); QUnit.test( "change", function( assert ) { - assert.expect( 6 ); + assert.expect( 8 ); var shouldFire, eventType; this.element.calendar( { - change: function( event ) { + change: function( event, ui ) { assert.ok( shouldFire, "change event fired" ); assert.equal( event.type, @@ -29,6 +29,7 @@ QUnit.test( "change", function( assert ) { eventType, "change originalEvent on calendar button " + eventType ); + assert.equal( $.type( ui.value ), "date", "value is a date object" ); } } ); @@ -48,14 +49,14 @@ QUnit.test( "change", function( assert ) { } ); QUnit.test( "select", function( assert ) { - assert.expect( 6 ); + assert.expect( 8 ); var ready = assert.async(), that = this, message, eventType; this.element.calendar( { - select: function( event ) { + select: function( event, ui ) { assert.ok( true, "select event fired " + message ); assert.equal( event.type, @@ -67,6 +68,7 @@ QUnit.test( "select", function( assert ) { eventType, "select originalEvent " + message ); + assert.equal( $.type( ui.value ), "date", "value is a date object" ); } } ); |