diff --git a/test/widget/selectSpec.js b/test/widget/selectSpec.js index f75899cfa958..63699d01c87f 100644 --- a/test/widget/selectSpec.js +++ b/test/widget/selectSpec.js @@ -429,17 +429,16 @@ describe('select', function() { expect(select.find('option').length).toEqual(1); }); - it('should select correct input if previously bound to something not in the list', function() { + it('should select correct input if previously selected option was "?"', function() { createSingleSelect(); scope.values = [{name:'A'},{name:'B'}]; scope.selected = {}; scope.$digest(); expect(select.find('option').length).toEqual(3); expect(select.val()).toEqual('?'); - expect(jqLite(select.find('option')[0]).val()).toEqual('?'); + expect(select.find('option').eq(0).val()).toEqual('?'); - select.find('option').eq(1).prop('selected', true); - browserTrigger(select, 'change'); + browserTrigger(select.find('option').eq(1)); expect(select.val()).toEqual('0'); expect(select.find('option').eq(0).prop('selected')).toBeTruthy(); expect(select.find('option').length).toEqual(2); @@ -520,7 +519,5 @@ describe('select', function() { expect(scope.selected).toEqual([scope.values[0]]); }); }); - }); - });