File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -2029,6 +2029,20 @@ describe('ngOptions', function() {
2029
2029
expect ( option . text ( ) ) . toBe ( 'is blank' ) ;
2030
2030
} ) ;
2031
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
+
2032
2046
2033
2047
it ( 'should be rendered with the attributes preserved' , function ( ) {
2034
2048
var option ;
You can’t perform that action at this time.
0 commit comments