File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,22 +104,22 @@ describe('ng-include', function() {
104104 $rootScope . url = 'url1' ;
105105 $rootScope . $digest ( ) ;
106106 $httpBackend . flush ( ) ;
107- expect ( element . children ( ) . scope ( ) ) . toBeTruthy ( ) ;
107+ expect ( element . children ( ) . scope ( ) . $parent ) . toBe ( $rootScope ) ;
108108 expect ( element . text ( ) ) . toBe ( 'partial url1' ) ;
109109
110110 $rootScope . url = 'url2' ;
111111 $rootScope . $digest ( ) ;
112112 $httpBackend . flush ( ) ;
113- expect ( element . children ( ) . scope ( ) ) . toBeFalsy ( ) ;
113+ expect ( $rootScope . $$childHead ) . toBeFalsy ( ) ;
114114 expect ( element . text ( ) ) . toBe ( '' ) ;
115115
116116 $rootScope . url = 'url1' ;
117117 $rootScope . $digest ( ) ;
118- expect ( element . children ( ) . scope ( ) ) . toBeTruthy ( ) ;
118+ expect ( element . children ( ) . scope ( ) . $parent ) . toBe ( $rootScope ) ;
119119
120120 $rootScope . url = null ;
121121 $rootScope . $digest ( ) ;
122- expect ( element . children ( ) . scope ( ) ) . toBeFalsy ( ) ;
122+ expect ( $rootScope . $$childHead ) . toBeFalsy ( ) ;
123123 } ) ) ;
124124
125125
You can’t perform that action at this time.
0 commit comments