Skip to content

Commit 14480b3

Browse files
committed
WIP: improve test descriptions
1 parent e5ed1a0 commit 14480b3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/ng/directive/selectSpec.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -591,16 +591,16 @@ describe('select', function() {
591591
});
592592

593593

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() {
595595
createSelect({
596596
'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'
598598
});
599599

600600
var selectedIdx;
601601

602602
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'}];
604604
scope.selected = 10;
605605
});
606606

@@ -1483,18 +1483,19 @@ describe('select', function() {
14831483
expect(element.find('option')[0].selected).toEqual(false);
14841484
});
14851485

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',
14871488
function() {
14881489
createSelect({
14891490
'ng-model': 'selected',
14901491
'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'
14921493
});
14931494

14941495
var selectedIdx;
14951496

14961497
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'}];
14981499
scope.selected = [10];
14991500
});
15001501

0 commit comments

Comments
 (0)