Skip to content

Commit 5ff7f00

Browse files
committed
fix up
1 parent 38ea53e commit 5ff7f00

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test/widget/selectSpec.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -429,17 +429,16 @@ describe('select', function() {
429429
expect(select.find('option').length).toEqual(1);
430430
});
431431

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() {
433433
createSingleSelect();
434434
scope.values = [{name:'A'},{name:'B'}];
435435
scope.selected = {};
436436
scope.$digest();
437437
expect(select.find('option').length).toEqual(3);
438438
expect(select.val()).toEqual('?');
439-
expect(jqLite(select.find('option')[0]).val()).toEqual('?');
439+
expect(select.find('option').eq(0).val()).toEqual('?');
440440

441-
select.find('option').eq(1).prop('selected', true);
442-
browserTrigger(select, 'change');
441+
browserTrigger(select.find('option').eq(1));
443442
expect(select.val()).toEqual('0');
444443
expect(select.find('option').eq(0).prop('selected')).toBeTruthy();
445444
expect(select.find('option').length).toEqual(2);
@@ -520,7 +519,5 @@ describe('select', function() {
520519
expect(scope.selected).toEqual([scope.values[0]]);
521520
});
522521
});
523-
524522
});
525-
526523
});

0 commit comments

Comments
 (0)