Skip to content

Commit

Permalink
fix up
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMinar committed Oct 18, 2011
1 parent 38ea53e commit 5ff7f00
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/widget/selectSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -520,7 +519,5 @@ describe('select', function() {
expect(scope.selected).toEqual([scope.values[0]]);
});
});

});

});

0 comments on commit 5ff7f00

Please sign in to comment.