');
+ $compile(element)(injector, element);
+
+ $http.flush().then(expectAsync1((data) {
+ expect(renderedText(element)).toEqual('Simple!Simple!');
+ // Note: There is no ordering. It is who ever comes off the wire first!
+ expect(log.result()).toEqual('LOG; LOG; SIMPLE; SIMPLE');
+ }));
+ }));
+
it('should load a CSS file into a style', inject((MockHttp $http, Compiler $compile, Scope $rootScope, Log log, Injector injector) {
$http.expectGET('simple.html', '
Simple!
');
@@ -73,7 +94,9 @@ main() {
it('should load a CSS file with a \$template', inject((Compiler $compile, Scope $rootScope, Injector injector) {
var element = $('
ignore');
$compile(element)(injector, element);
- expect(renderedText(element)).toEqual('@import "simple.css"inline!');
+ InlineWithCssComponent.lastTemplateLoader.template.then(expectAsync1((_) {
+ expect(renderedText(element)).toEqual('@import "simple.css"inline!');
+ }));
}));
it('should load a CSS with no template', inject((Compiler $compile, Scope $rootScope, Injector injector) {