aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/httpSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/service/httpSpec.js')
-rw-r--r--test/service/httpSpec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/service/httpSpec.js b/test/service/httpSpec.js
index 11165adc..12921992 100644
--- a/test/service/httpSpec.js
+++ b/test/service/httpSpec.js
@@ -686,6 +686,16 @@ describe('$http', function() {
});
+ it('should broadcast $http.request', function() {
+ $httpBackend.when('GET').then(200);
+ scope.$on('$http.request', callback);
+ var xhrFuture = $http({method: 'GET', url: '/whatever'});
+
+ expect(callback).toHaveBeenCalledOnce();
+ expect(callback.mostRecentCall.args[1]).toBe(xhrFuture);
+ });
+
+
describe('transform', function() {
describe('request', function() {