diff options
| author | Igor Minar | 2012-01-12 16:50:31 -0800 | 
|---|---|---|
| committer | Igor Minar | 2012-01-13 14:28:20 -0800 | 
| commit | b7f4d8c3c3c537f895d3cd7369f5b23ec94820e0 (patch) | |
| tree | 7ab318844ac633a28b22af0bf3d697e0e7284119 /test | |
| parent | 939c8e8fac0487da12e56291d69c5199a8ed9a30 (diff) | |
| download | angular.js-b7f4d8c3c3c537f895d3cd7369f5b23ec94820e0.tar.bz2 | |
fix($http): anonnymous response interceptors should be treated as factories
Diffstat (limited to 'test')
| -rw-r--r-- | test/service/httpSpec.js | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/test/service/httpSpec.js b/test/service/httpSpec.js index d827e941..766238d8 100644 --- a/test/service/httpSpec.js +++ b/test/service/httpSpec.js @@ -51,11 +51,13 @@ describe('$http', function() {              };            });            // just change the response data and pass the response object along -          $httpProvider.responseInterceptors.push(function(httpPromise) { -            return httpPromise.then(function(response) { -              response.data += '!'; -              return response; -            }); +          $httpProvider.responseInterceptors.push(function() { +            return function(httpPromise) { +              return httpPromise.then(function(response) { +                response.data += '!'; +                return response; +              }); +            }            });            // return a new resolved promise representing modified response object  | 
