aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/scopeSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2012-01-27 16:18:16 -0800
committerMisko Hevery2012-02-21 22:46:00 -0800
commit78656fe0dfc99c341ce02d71e7006e9c05b1fe3f (patch)
treea68731c4c1675047da65b23ccf3d562324324081 /test/service/scopeSpec.js
parentcb10ccc44fa78b82c80afa1cb5dac2c34fdf24b7 (diff)
downloadangular.js-78656fe0dfc99c341ce02d71e7006e9c05b1fe3f.tar.bz2
feat($compile) add locals, isolate scope, transclusion
Diffstat (limited to 'test/service/scopeSpec.js')
-rw-r--r--test/service/scopeSpec.js9
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);
+ }));
});