, - $httpBackend.flush() $rootScope.$digest(). , flush , , , , http-, , .
, , HTTP- . :
beforeEach(inject(function($compile, $rootScope, $httpBackend) {
$httpBackend.expectGET('login.html').respond('<div></div>');
$compile('<login-page/>')($rootScope);
$httpBackend.flush();
}));
, , , . $httpBackend - , templateUrl then . , , - $http, , $httpBackend, , .
, $rootScope.$digest() promises, :
beforeEach(inject(function($compile, $rootScope) {
$compile('<login-page/>')($rootScope);
$rootScope.$digest();
}));
beforeEach, , .