@@ -3,65 +3,65 @@ import Ember from 'ember';
33
44moduleForComponent ( 'bootstrap-datepicker' , 'bootstrap-datepicker component' ) ;
55
6- test ( 'should be an input tag' , function ( ) {
7- expect ( 1 ) ;
6+ test ( 'should be an input tag' , function ( assert ) {
7+ assert . expect ( 1 ) ;
88
9- equal ( 'INPUT' , this . $ ( ) . prop ( 'tagName' ) ) ;
9+ assert . equal ( 'INPUT' , this . $ ( ) . prop ( 'tagName' ) ) ;
1010} ) ;
1111
12- test ( 'should display empty input field when no date is set' , function ( ) {
13- expect ( 1 ) ;
12+ test ( 'should display empty input field when no date is set' , function ( assert ) {
13+ assert . expect ( 1 ) ;
1414
1515 var component = this . subject ( {
1616 value : null
1717 } ) ;
1818
19- equal ( this . $ ( ) . val ( ) , '' ) ;
19+ assert . equal ( this . $ ( ) . val ( ) , '' ) ;
2020} ) ;
2121
2222
23- test ( 'should display date with default format when no format is set' , function ( ) {
24- expect ( 1 ) ;
23+ test ( 'should display date with default format when no format is set' , function ( assert ) {
24+ assert . expect ( 1 ) ;
2525
2626 var component = this . subject ( {
2727 value : new Date ( 2014 , 11 , 31 )
2828 } ) ;
2929
30- equal ( this . $ ( ) . val ( ) , '12/31/2014' ) ;
30+ assert . equal ( this . $ ( ) . val ( ) , '12/31/2014' ) ;
3131} ) ;
3232
33- test ( 'should display date with custom format when format is set' , function ( ) {
34- expect ( 1 ) ;
33+ test ( 'should display date with custom format when format is set' , function ( assert ) {
34+ assert . expect ( 1 ) ;
3535
3636 var component = this . subject ( {
3737 value : new Date ( 2014 , 11 , 31 ) ,
3838 format : 'dd.M.yy'
3939 } ) ;
4040
41- equal ( this . $ ( ) . val ( ) , '31.Dec.14' ) ;
41+ assert . equal ( this . $ ( ) . val ( ) , '31.Dec.14' ) ;
4242} ) ;
4343
44- test ( 'should set dates provided by value (multidate, default multidateSeparator)' , function ( ) {
45- expect ( 2 ) ;
44+ test ( 'should set dates provided by value (multidate, default multidateSeparator)' , function ( assert ) {
45+ assert . expect ( 2 ) ;
4646
4747 var component = this . subject ( {
4848 value : [ new Date ( 2015 , 0 , 13 ) , new Date ( 2015 , 0 , 7 ) , new Date ( 2015 , 0 , 15 ) ] ,
4949 multidate : true
5050 } ) ;
5151
52- equal ( this . $ ( ) . val ( ) , '01/13/2015,01/07/2015,01/15/2015' , 'should set value as input field value' ) ;
53- equal ( this . $ ( ) . datepicker ( 'getDates' ) . length , 3 , 'should set internal datepicker dates by value' ) ;
52+ assert . equal ( this . $ ( ) . val ( ) , '01/13/2015,01/07/2015,01/15/2015' , 'should set value as input field value' ) ;
53+ assert . equal ( this . $ ( ) . datepicker ( 'getDates' ) . length , 3 , 'should set internal datepicker dates by value' ) ;
5454} ) ;
5555
56- test ( 'should set dates provided by value (multidate, multidateSeparator provided)' , function ( ) {
57- expect ( 2 ) ;
56+ test ( 'should set dates provided by value (multidate, multidateSeparator provided)' , function ( assert ) {
57+ assert . expect ( 2 ) ;
5858
5959 var component = this . subject ( {
6060 value : [ new Date ( 2015 , 0 , 13 ) , new Date ( 2015 , 0 , 7 ) , new Date ( 2015 , 0 , 15 ) ] ,
6161 multidate : true ,
6262 multidateSeparator : ';'
6363 } ) ;
6464
65- equal ( this . $ ( ) . val ( ) , '01/13/2015;01/07/2015;01/15/2015' , 'should set value as input field value using multidate separator' ) ;
66- equal ( this . $ ( ) . datepicker ( 'getDates' ) . length , 3 , 'should set internal datepicker dates by value' ) ;
65+ assert . equal ( this . $ ( ) . val ( ) , '01/13/2015;01/07/2015;01/15/2015' , 'should set value as input field value using multidate separator' ) ;
66+ assert . equal ( this . $ ( ) . datepicker ( 'getDates' ) . length , 3 , 'should set internal datepicker dates by value' ) ;
6767} ) ;
0 commit comments