mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 03:30:02 +08:00
fix(templateRequest): allow empty html template
allow empty html template and not throw error Closes #9581
This commit is contained in:
committed by
Vojta Jina
parent
38d12de661
commit
52ceec2229
@@ -43,7 +43,7 @@ describe('$templateRequest', function() {
|
||||
}).toThrowMinErr('$compile', 'tpload', 'Failed to load template: tpl.html');
|
||||
}));
|
||||
|
||||
it('should throw an error when the template is empty',
|
||||
it('should not throw an error when the template is empty',
|
||||
inject(function($rootScope, $templateRequest, $httpBackend) {
|
||||
|
||||
$httpBackend.expectGET('tpl.html').respond('');
|
||||
@@ -55,7 +55,7 @@ describe('$templateRequest', function() {
|
||||
expect(function() {
|
||||
$rootScope.$digest();
|
||||
$httpBackend.flush();
|
||||
}).toThrowMinErr('$compile', 'tpload', 'Failed to load template: tpl.html');
|
||||
}).not.toThrow();
|
||||
}));
|
||||
|
||||
it('should keep track of how many requests are going on',
|
||||
|
||||
Reference in New Issue
Block a user