added ng:include

This commit is contained in:
Misko Hevery
2010-04-05 14:09:25 -07:00
parent 7a4b480206
commit 1c670b2a7c
6 changed files with 55 additions and 12 deletions

View File

@@ -203,6 +203,11 @@ describe("input widget", function(){
describe('ng:include', function(){
it('should include on external file', function() {
var element = jqLite('<ng:include src="myUrl"></ng:include>');
var scope = compile(element).$init();
var scope = compile(element);
scope.$browser.xhr.expect('GET', 'myUrl').respond('hello');
scope.$init();
expect(sortedHtml(element)).toEqual('<ng:include src="myUrl" switch-instance="compiled"></ng:include>');
scope.$browser.xhr.flush();
expect(sortedHtml(element)).toEqual('<ng:include src="myUrl" switch-instance="compiled">hello</ng:include>');
});
});