From d9ee3a1ec4e03a46de86adf4db6ce8cd95d88247 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Tue, 24 Mar 2015 20:06:32 +0100 Subject: [PATCH] Calendar tests: Fix dateFormat option test Do not use value option to pass in a string but value method. --- tests/unit/calendar/calendar_options.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/unit/calendar/calendar_options.js b/tests/unit/calendar/calendar_options.js index f1ec94755..f8e942e03 100644 --- a/tests/unit/calendar/calendar_options.js +++ b/tests/unit/calendar/calendar_options.js @@ -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" } );