aboutsummaryrefslogtreecommitdiffstats
path: root/test/directive/ngNonBindableSpec.js
blob: 8b74536489da2b4b92eff4076d15a177dce1b1df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'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><span ng-bind="name"></span></div>')($rootScope);
    $rootScope.name =  'misko';
    $rootScope.$digest();
    expect(element.text()).toEqual('');
  }));
});