mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
added ng:include
This commit is contained in:
@@ -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>');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user