We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b14639 commit c64b4bcCopy full SHA for c64b4bc
test/ng/directive/ngOptionsSpec.js
@@ -2029,6 +2029,20 @@ describe('ngOptions', function() {
2029
expect(option.text()).toBe('is blank');
2030
});
2031
2032
+ it('should support option without a value attribute', function() {
2033
+ createSingleSelect('<option>--select--</option>');
2034
+ scope.$apply(function() {
2035
+ scope.values = [{name: 'A'}, {name: 'B'}, {name: 'C'}];
2036
+ });
2037
+
2038
+ var options = element.find('option');
2039
2040
+ expect(options.eq(0)).toEqualUnknownOption();
2041
+ expect(options.eq(1)).toEqualOption(scope.values[0], 'A');
2042
+ expect(options.eq(2)).toEqualOption(scope.values[1], 'B');
2043
+ expect(options.eq(3)).toEqualOption(scope.values[2], 'C');
2044
2045
2046
2047
it('should be rendered with the attributes preserved', function() {
2048
var option;
0 commit comments