mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Calendar tests: Add basic value option tests
This commit is contained in:
parent
18ad526cfd
commit
877937e5c6
@ -310,6 +310,21 @@ test( "numberOfMonths", function() {
|
||||
);
|
||||
} );
|
||||
|
||||
test( "value", function( assert ) {
|
||||
expect( 4 );
|
||||
|
||||
var date = new Date( 2016, 5 - 1, 23 );
|
||||
|
||||
assert.equal( this.element.calendar( "option", "value" ), null, "Initial value" );
|
||||
|
||||
this.element.calendar( "option", "value", date );
|
||||
assert.dateEqual( this.element.calendar( "option", "value" ), date, "Value set" );
|
||||
equal( this.widget.find( "table button.ui-state-active" ).data( "timestamp" ), 1463954400000, "Active button timestamp" );
|
||||
|
||||
this.element.calendar( "option", "value", "invalid" );
|
||||
assert.dateEqual( this.element.calendar( "option", "value" ), date, "Value after invalid parameter" );
|
||||
} );
|
||||
|
||||
/*
|
||||
// TODO: Move this to $.date, Globalize or calendar widget
|
||||
test( "daylightSaving", function() {
|
||||
|
Loading…
Reference in New Issue
Block a user