aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/ngNonBindableSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng/directive/ngNonBindableSpec.js')
-rw-r--r--test/ng/directive/ngNonBindableSpec.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ng/directive/ngNonBindableSpec.js b/test/ng/directive/ngNonBindableSpec.js
new file mode 100644
index 00000000..1f7bf25d
--- /dev/null
+++ b/test/ng/directive/ngNonBindableSpec.js
@@ -0,0 +1,21 @@
+'use strict';
+
+
+describe('ng-non-bindable', function() {
+ var element;
+
+
+ afterEach(function(){
+ dealoc(element);
+ });
+
+
+ it('should prevent compilation of the owning element and its children',
+ inject(function($rootScope, $compile) {
+ element = $compile('<div ng-non-bindable text="{{name}}"><span ng-bind="name"></span></div>')($rootScope);
+ $rootScope.name = 'misko';
+ $rootScope.$digest();
+ expect(element.text()).toEqual('');
+ expect(element.attr('text')).toEqual('{{name}}');
+ }));
+});