aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ngMock/angular-mocks.js4
-rw-r--r--test/ngMock/angular-mocksSpec.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js
index f7a9fec7..e016bc32 100644
--- a/src/ngMock/angular-mocks.js
+++ b/src/ngMock/angular-mocks.js
@@ -1045,7 +1045,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
}
// TODO(vojta): change params to: method, url, data, headers, callback
- function $httpBackend(method, url, data, callback, headers, timeout) {
+ function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
var xhr = new MockXhr(),
expectation = expectations[0],
wasExpected = false;
@@ -1103,7 +1103,7 @@ function createHttpBackendMock($rootScope, $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);
+ $delegate(method, url, data, callback, headers, timeout, withCredentials);
} else throw Error('No response defined !');
return;
}
diff --git a/test/ngMock/angular-mocksSpec.js b/test/ngMock/angular-mocksSpec.js
index 9002d854..893fe14c 100644
--- a/test/ngMock/angular-mocksSpec.js
+++ b/test/ngMock/angular-mocksSpec.js
@@ -1088,10 +1088,10 @@ describe('ngMockE2E', function() {
describe('passThrough()', function() {
it('should delegate requests to the real backend when passThrough is invoked', function() {
hb.when('GET', /\/passThrough\/.*/).passThrough();
- hb('GET', '/passThrough/23', null, callback);
+ hb('GET', '/passThrough/23', null, callback, {}, null, true);
expect(realHttpBackend).toHaveBeenCalledOnceWith(
- 'GET', '/passThrough/23', null, callback, undefined, undefined);
+ 'GET', '/passThrough/23', null, callback, {}, null, true);
});
});