Calendar tests: Fix dateFormat option test

Do not use value option to pass in a string but value method.
This commit is contained in:
Felix Nagel 2015-03-24 20:06:32 +01:00
parent 4c2229fc51
commit d9ee3a1ec4

View File

@ -109,12 +109,11 @@ test( "buttons - advanced", function() {
test( "dateFormat", function() {
expect( 2 );
var element = $( "#calendar" ).calendar({
value: "1/1/14"
}),
firstDayLink = element.calendar( "widget" ).find( "td[id]:first button" );
var element = $( "#calendar" ).calendar();
firstDayLink.trigger( "mousedown" );
element.calendar( "value", "1/1/14" );
element.calendar( "widget" ).find( "td[id]:first button" ).trigger( "mousedown" );
equal( element.calendar( "value" ), "1/1/14", "default formatting" );
element.calendar( "option", "dateFormat", { date: "full" } );