Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f3d5fc2

Browse files
committedOct 7, 2014
WIP: add view->model assertions to tests
1 parent 14480b3 commit f3d5fc2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎test/ng/directive/selectSpec.js

+12
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,10 @@ describe('select', function() {
611611
});
612612

613613
expect(element.val()).toEqual('1');
614+
615+
element.val('0');
616+
browserTrigger(element, 'change');
617+
expect(scope.selected).toBe(10);
614618
});
615619

616620

@@ -1506,6 +1510,14 @@ describe('select', function() {
15061510
});
15071511

15081512
expect(element.val()).toEqual(['1']);
1513+
1514+
dump('triggering!');
1515+
element.val(['0']);
1516+
browserTrigger(element, 'change');
1517+
scope.$digest();
1518+
dump(element);
1519+
1520+
expect(scope.selected).toEqual([10]);
15091521
});
15101522
});
15111523

0 commit comments

Comments
 (0)
Please sign in to comment.