From 8fe4295a064caa699edd902711d396164cf092f4 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Tue, 3 Apr 2012 19:01:57 -0700 Subject: refactor(ngInclude): correct the tests --- test/ng/directive/ngIncludeSpec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/ng/directive/ngIncludeSpec.js') diff --git a/test/ng/directive/ngIncludeSpec.js b/test/ng/directive/ngIncludeSpec.js index a30ed11e..cf173215 100644 --- a/test/ng/directive/ngIncludeSpec.js +++ b/test/ng/directive/ngIncludeSpec.js @@ -104,22 +104,22 @@ describe('ng-include', function() { $rootScope.url = 'url1'; $rootScope.$digest(); $httpBackend.flush(); - expect(element.children().scope()).toBeTruthy(); + expect(element.children().scope().$parent).toBe($rootScope); expect(element.text()).toBe('partial url1'); $rootScope.url = 'url2'; $rootScope.$digest(); $httpBackend.flush(); - expect(element.children().scope()).toBeFalsy(); + expect($rootScope.$$childHead).toBeFalsy(); expect(element.text()).toBe(''); $rootScope.url = 'url1'; $rootScope.$digest(); - expect(element.children().scope()).toBeTruthy(); + expect(element.children().scope().$parent).toBe($rootScope); $rootScope.url = null; $rootScope.$digest(); - expect(element.children().scope()).toBeFalsy(); + expect($rootScope.$$childHead).toBeFalsy(); })); -- cgit v1.2.3