@@ -591,16 +591,16 @@ describe('select', function() {
591
591
} ) ;
592
592
593
593
594
- it ( 'should bind to scope value through expression while tracking/identifying objects ' , function ( ) {
594
+ iit ( 'should bind to scope value through selectAs expression while tracking object via track by ' , function ( ) {
595
595
createSelect ( {
596
596
'ng-model' : 'selected' ,
597
- 'ng-options' : 'item.id as item.name for item in values track by item.trackId '
597
+ 'ng-options' : 'item.id as item.name for item in values track by item.id '
598
598
} ) ;
599
599
600
600
var selectedIdx ;
601
601
602
602
scope . $apply ( function ( ) {
603
- scope . values = [ { id : 10 , trackId : 100 , name : 'A' } , { id : 20 , trackId : 200 , name : 'B' } ] ;
603
+ scope . values = [ { id : 10 , name : 'A' } , { id : 20 , name : 'B' } ] ;
604
604
scope . selected = 10 ;
605
605
} ) ;
606
606
@@ -1483,18 +1483,19 @@ describe('select', function() {
1483
1483
expect ( element . find ( 'option' ) [ 0 ] . selected ) . toEqual ( false ) ;
1484
1484
} ) ;
1485
1485
1486
- it ( 'should bind to scope with multiple:true while tracking/identifying objects with multiple' ,
1486
+
1487
+ it ( 'should bind to scope value through selectAs expression while tracking object via track by with mutliple:true' ,
1487
1488
function ( ) {
1488
1489
createSelect ( {
1489
1490
'ng-model' : 'selected' ,
1490
1491
'multiple' : true ,
1491
- 'ng-options' : 'item.id as item.name for item in values track by item.trackId '
1492
+ 'ng-options' : 'item.id as item.name for item in values track by item.id '
1492
1493
} ) ;
1493
1494
1494
1495
var selectedIdx ;
1495
1496
1496
1497
scope . $apply ( function ( ) {
1497
- scope . values = [ { id : 10 , trackId : 100 , name : 'A' } , { id : 20 , trackId : 200 , name : 'B' } ] ;
1498
+ scope . values = [ { id : 10 , name : 'A' } , { id : 20 , name : 'B' } ] ;
1498
1499
scope . selected = [ 10 ] ;
1499
1500
} ) ;
1500
1501
0 commit comments