From 4ae46814ff4e7c0bbcdbbefc0a97277283a84065 Mon Sep 17 00:00:00 2001
From: Sylvester Keil
Date: Tue, 26 Feb 2013 10:22:12 +0100
Subject: feat(http): support request/response promise chaining
myApp.factory('myAroundInterceptor', function($rootScope, $timeout) {
return function(configPromise, responsePromise) {
return {
request: configPromise.then(function(config) {
return config
});
response: responsePromise.then(function(response) {
return 'ha!';
}
});
}
myApp.config(function($httpProvider){
$httpProvider.aroundInterceptors.push('myAroundInterceptor');
});
---
test/ng/directive/ngIncludeSpec.js | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
(limited to 'test/ng/directive')
diff --git a/test/ng/directive/ngIncludeSpec.js b/test/ng/directive/ngIncludeSpec.js
index 7c94a70e..dce803b5 100644
--- a/test/ng/directive/ngIncludeSpec.js
+++ b/test/ng/directive/ngIncludeSpec.js
@@ -178,25 +178,23 @@ describe('ngInclude', function() {
it('should discard pending xhr callbacks if a new template is requested before the current ' +
'finished loading', inject(function($rootScope, $compile, $httpBackend) {
element = jqLite("