aboutsummaryrefslogtreecommitdiffstats
path: root/test/markupSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/markupSpec.js')
-rw-r--r--test/markupSpec.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/markupSpec.js b/test/markupSpec.js
index 9e89af7b..8ea88f08 100644
--- a/test/markupSpec.js
+++ b/test/markupSpec.js
@@ -30,11 +30,11 @@ describe("markups", function(){
});
it('should translate {{}} in terminal nodes', function(){
- compile('<select><option>Greet {{name}}!</option></select>');
- expect(element.html()).toEqual('<option ng-bind-template="Greet {{name}}!"></option>');
+ compile('<select name="x"><option value="">Greet {{name}}!</option></select>');
+ expect(element.html()).toEqual('<option ng-bind-template="Greet {{name}}!" value=""></option>');
scope.set('name', 'Misko');
scope.updateView();
- expect(element.html()).toEqual('<option ng-bind-template="Greet {{name}}!">Greet Misko!</option>');
+ expect(element.html()).toEqual('<option ng-bind-template="Greet {{name}}!" value="">Greet Misko!</option>');
});
it('should translate {{}} in attributes', function(){
@@ -46,4 +46,9 @@ describe("markups", function(){
expect(element.attr('src')).toEqual("http://server/a/b.png");
});
+ it('should populate value attribute on OPTION', function(){
+ compile('<select name="x"><option>A</option></select>');
+ expect(element.html()).toEqual('<option value="A">A</option>');
+ });
+
});