aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/compilerSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/service/compilerSpec.js')
-rw-r--r--test/service/compilerSpec.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/service/compilerSpec.js b/test/service/compilerSpec.js
index cc4bb026..d8ee697b 100644
--- a/test/service/compilerSpec.js
+++ b/test/service/compilerSpec.js
@@ -1115,7 +1115,23 @@ describe('$compile', function() {
expect(observeSpy.callCount).toBe(2);
expect($exceptionHandler.errors).toEqual(['ERROR', 'ERROR']);
});
- })
+ });
+
+
+ it('should translate {{}} in terminal nodes', inject(function($rootScope, $compile) {
+ element = $compile('<select ng:model="x"><option value="">Greet {{name}}!</option></select>')($rootScope)
+ $rootScope.$digest();
+ expect(sortedHtml(element).replace(' selected="true"', '')).
+ toEqual('<select ng:model="x">' +
+ '<option>Greet !</option>' +
+ '</select>');
+ $rootScope.name = 'Misko';
+ $rootScope.$digest();
+ expect(sortedHtml(element).replace(' selected="true"', '')).
+ toEqual('<select ng:model="x">' +
+ '<option>Greet Misko!</option>' +
+ '</select>');
+ }));
});