Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e9a00fb

Browse files
test(select): add extra expectations and comments for clarity
1 parent d018ac2 commit e9a00fb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/ng/directive/selectSpec.js

+7
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,8 @@ describe('select', function() {
735735

736736
it('should not update selected property of an option element on digest with no change event',
737737
function() {
738+
// ng-options="value.name for value in values"
739+
// ng-model="selected"
738740
createSingleSelect();
739741

740742
scope.$apply(function() {
@@ -743,6 +745,11 @@ describe('select', function() {
743745
});
744746

745747
var options = element.find('option');
748+
749+
expect(scope.selected).toEqual({ name: 'A' });
750+
expect(options.eq(0).prop('selected')).toBe(true);
751+
expect(options.eq(1).prop('selected')).toBe(false);
752+
746753
var optionToSelect = options.eq(1);
747754

748755
expect(optionToSelect.text()).toBe('B');

0 commit comments

Comments
 (0)