diff options
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); + })); }); |
