From 1c0f7213687f7e72ef8c028898c193e1834b2dd2 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Wed, 28 Oct 2015 22:03:42 +0000 Subject: [PATCH] test($rootScope): ensure that only child scopes are disconnected Related to #11786 and 8fe781fbe7c42c64eb895c28d9fd5479b037d020 --- test/ng/rootScopeSpec.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/ng/rootScopeSpec.js b/test/ng/rootScopeSpec.js index e704608db990..a9a1ae120494 100644 --- a/test/ng/rootScopeSpec.js +++ b/test/ng/rootScopeSpec.js @@ -1219,15 +1219,17 @@ describe('Scope', function() { var parent = $rootScope.$new(), child1 = parent.$new(), child2 = parent.$new(), - grandChild = child1.$new(); - parent.$destroy(); + grandChild1 = child1.$new(), + grandChild2 = child1.$new(); + child1.$destroy(); $rootScope.$digest(); - expect(isDisconnected(parent)).toBe(true); + expect(isDisconnected(parent)).toBe(false); expect(isDisconnected(child1)).toBe(true); - expect(isDisconnected(child2)).toBe(true); - expect(isDisconnected(grandChild)).toBe(true); + expect(isDisconnected(child2)).toBe(false); + expect(isDisconnected(grandChild1)).toBe(true); + expect(isDisconnected(grandChild2)).toBe(true); function isDisconnected($scope) { return $scope.$$nextSibling === null &&