diff options
| author | Misko Hevery | 2012-01-27 16:18:16 -0800 |
|---|---|---|
| committer | Misko Hevery | 2012-02-21 22:46:00 -0800 |
| commit | 78656fe0dfc99c341ce02d71e7006e9c05b1fe3f (patch) | |
| tree | a68731c4c1675047da65b23ccf3d562324324081 /test/service/scopeSpec.js | |
| parent | cb10ccc44fa78b82c80afa1cb5dac2c34fdf24b7 (diff) | |
| download | angular.js-78656fe0dfc99c341ce02d71e7006e9c05b1fe3f.tar.bz2 | |
feat($compile) add locals, isolate scope, transclusion
Diffstat (limited to 'test/service/scopeSpec.js')
| -rw-r--r-- | test/service/scopeSpec.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/service/scopeSpec.js b/test/service/scopeSpec.js index c3a09cc8..179ff162 100644 --- a/test/service/scopeSpec.js +++ b/test/service/scopeSpec.js @@ -53,6 +53,15 @@ describe('Scope', function() { $rootScope.a = 123; expect(child.a).toEqual(123); })); + + it('should create a non prototypically inherited child scope', inject(function($rootScope) { + var child = $rootScope.$new(true); + $rootScope.a = 123; + expect(child.a).toBeUndefined(); + expect(child.$parent).toEqual($rootScope); + expect(child.$new).toBe($rootScope.$new); + expect(child.$root).toBe($rootScope); + })); }); |
