diff options
| author | Vojta Jina | 2012-04-03 19:01:57 -0700 |
|---|---|---|
| committer | Vojta Jina | 2012-04-04 14:58:07 -0700 |
| commit | 8fe4295a064caa699edd902711d396164cf092f4 (patch) | |
| tree | ff0c9bef1d53e9dd5d5748093406c540768f199e | |
| parent | dcb8e0767fbf0a7a55f3b0045fd01b2532ea5441 (diff) | |
| download | angular.js-8fe4295a064caa699edd902711d396164cf092f4.tar.bz2 | |
refactor(ngInclude): correct the tests
| -rw-r--r-- | test/ng/directive/ngIncludeSpec.js | 8 |
1 files changed, 4 insertions, 4 deletions
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(); })); |
