diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index f58bc56616f9..0ce601e763e8 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -1392,7 +1392,7 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) { // if $browser specified, we do auto flush all requests ($browser ? $browser.defer : responsesPush)(wrapResponse(definition)); } else if (definition.passThrough) { - $delegate(method, url, data, callback, headers, timeout, withCredentials, responseType); + $delegate(method, url, data, callback, headers, timeout, withCredentials, responseType, eventHandlers, uploadEventHandlers); } else throw new Error('No response defined !'); return; } diff --git a/test/ngMock/angular-mocksSpec.js b/test/ngMock/angular-mocksSpec.js index 985eabc375bc..dcd5e2ccc5ec 100644 --- a/test/ngMock/angular-mocksSpec.js +++ b/test/ngMock/angular-mocksSpec.js @@ -2137,7 +2137,7 @@ describe('ngMockE2E', function() { hb('GET', '/passThrough/23', null, callback, {}, null, true, 'blob'); expect(realHttpBackend).toHaveBeenCalledOnceWith( - 'GET', '/passThrough/23', null, callback, {}, null, true, 'blob'); + 'GET', '/passThrough/23', null, callback, {}, null, true, 'blob', undefined, undefined); }); it('should be able to override a respond definition with passThrough', function() { @@ -2146,7 +2146,7 @@ describe('ngMockE2E', function() { hb('GET', '/passThrough/23', null, callback, {}, null, true); expect(realHttpBackend).toHaveBeenCalledOnceWith( - 'GET', '/passThrough/23', null, callback, {}, null, true, undefined); + 'GET', '/passThrough/23', null, callback, {}, null, true, undefined, undefined, undefined); }); it('should be able to override a respond definition with passThrough', inject(function($browser) {