diff --git a/test/ng/directive/selectSpec.js b/test/ng/directive/selectSpec.js
index 3aca6176ec97..ec5d2bb3930f 100644
--- a/test/ng/directive/selectSpec.js
+++ b/test/ng/directive/selectSpec.js
@@ -964,22 +964,84 @@ describe('select', function() {
describe('option', function() {
- it('should populate value attribute on OPTION', function() {
+ it('should populate a missing value attribute with the option text', function() {
compile('');
expect(element).toEqualSelect([unknownValue(undefined)], 'abc');
});
- it('should ignore value if already exists', function() {
+
+ it('should ignore the option text if the value attribute exists', function() {
compile('');
expect(element).toEqualSelect([unknownValue(undefined)], 'abc');
});
+
it('should set value even if self closing HTML', function() {
scope.x = 'hello';
compile('');
expect(element).toEqualSelect(['hello']);
});
+
+ it('should add options with interpolated text',
+ inject(function($rootScope, $compile) {
+ var scope = $rootScope;
+
+ scope.option1 = 'Option 1';
+ scope.option2 = 'Option 2';
+
+ var element = $compile(
+ '