File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -429,17 +429,16 @@ describe('select', function() {
429
429
expect ( select . find ( 'option' ) . length ) . toEqual ( 1 ) ;
430
430
} ) ;
431
431
432
- it ( 'should select correct input if previously bound to something not in the list ' , function ( ) {
432
+ it ( 'should select correct input if previously selected option was "?" ' , function ( ) {
433
433
createSingleSelect ( ) ;
434
434
scope . values = [ { name :'A' } , { name :'B' } ] ;
435
435
scope . selected = { } ;
436
436
scope . $digest ( ) ;
437
437
expect ( select . find ( 'option' ) . length ) . toEqual ( 3 ) ;
438
438
expect ( select . val ( ) ) . toEqual ( '?' ) ;
439
- expect ( jqLite ( select . find ( 'option' ) [ 0 ] ) . val ( ) ) . toEqual ( '?' ) ;
439
+ expect ( select . find ( 'option' ) . eq ( 0 ) . val ( ) ) . toEqual ( '?' ) ;
440
440
441
- select . find ( 'option' ) . eq ( 1 ) . prop ( 'selected' , true ) ;
442
- browserTrigger ( select , 'change' ) ;
441
+ browserTrigger ( select . find ( 'option' ) . eq ( 1 ) ) ;
443
442
expect ( select . val ( ) ) . toEqual ( '0' ) ;
444
443
expect ( select . find ( 'option' ) . eq ( 0 ) . prop ( 'selected' ) ) . toBeTruthy ( ) ;
445
444
expect ( select . find ( 'option' ) . length ) . toEqual ( 2 ) ;
@@ -520,7 +519,5 @@ describe('select', function() {
520
519
expect ( scope . selected ) . toEqual ( [ scope . values [ 0 ] ] ) ;
521
520
} ) ;
522
521
} ) ;
523
-
524
522
} ) ;
525
-
526
523
} ) ;
You can’t perform that action at this time.
0 commit comments