@@ -39,9 +39,11 @@ QUnit.test( "widget method", function( assert ) {
3939
4040QUnit . test ( "baseStructure" , function ( assert ) {
4141 var ready = assert . async ( ) ;
42- assert . expect ( 58 ) ;
42+ assert . expect ( 60 ) ;
4343 var header , title , table , thead , week , panel , inl , child ,
44- inp = testHelper . initNewInput ( ) ,
44+ inp = testHelper . initNewInput ( {
45+ defaultDate : $ . datepicker . _newDate ( 1 , 2 - 1 , 3 )
46+ } ) ,
4547 dp = $ ( "#ui-datepicker-div" ) ;
4648
4749 function step1 ( ) {
@@ -61,7 +63,7 @@ QUnit.test( "baseStructure", function( assert ) {
6163 assert . ok ( title . is ( "div.ui-datepicker-title" ) && title . html ( ) !== "" , "Structure - title division" ) ;
6264 assert . equal ( title . children ( ) . length , 2 , "Structure - title child count" ) ;
6365 assert . ok ( title . children ( ) . first ( ) . is ( "span.ui-datepicker-month" ) && title . children ( ) . first ( ) . text ( ) !== "" , "Structure - month text" ) ;
64- assert . ok ( title . children ( ) . last ( ) . is ( "span.ui-datepicker-year" ) && title . children ( ) . last ( ) . text ( ) !== " ", "Structure - year text" ) ;
66+ assert . ok ( title . children ( ) . last ( ) . is ( "span.ui-datepicker-year" ) && title . children ( ) . last ( ) . text ( ) === "0001 ", "Structure - year text" ) ;
6567
6668 table = dp . children ( ) . eq ( 1 ) ;
6769 assert . ok ( table . is ( "table.ui-datepicker-calendar" ) , "Structure - month table" ) ;
@@ -90,12 +92,15 @@ QUnit.test( "baseStructure", function( assert ) {
9092 inp = testHelper . initNewInput ( {
9193 changeMonth : true ,
9294 changeYear : true ,
93- showButtonPanel : true
95+ showButtonPanel : true ,
96+ defaultDate : $ . datepicker . _newDate ( 1 , 2 - 1 , 3 )
9497 } ) ;
9598 testHelper . onFocus ( inp , function ( ) {
9699 title = dp . find ( "div.ui-datepicker-title" ) ;
97100 assert . ok ( title . children ( ) . first ( ) . is ( "select.ui-datepicker-month" ) , "Structure - month selector" ) ;
98101 assert . ok ( title . children ( ) . last ( ) . is ( "select.ui-datepicker-year" ) , "Structure - year selector" ) ;
102+ assert . equal ( title . children ( ) . last ( ) . children ( ) . first ( ) . text ( ) , "-9" ) ;
103+ assert . equal ( title . children ( ) . last ( ) . children ( ) . last ( ) . text ( ) , "0011" ) ;
99104
100105 panel = dp . children ( ) . last ( ) ;
101106 assert . ok ( panel . is ( "div.ui-datepicker-buttonpane" ) , "Structure - button panel division" ) ;
0 commit comments