diff options
| author | Étienne Barrié | 2013-07-31 14:50:56 +0200 |
|---|---|---|
| committer | Jeff Cross | 2013-08-01 16:07:33 -0700 |
| commit | 3079a6f4e097a777414b8c3a8a87b8e1e20b55b5 (patch) | |
| tree | 3a5998e71513583a89c08615dfc2fd057dc706aa /src/ngMock/angular-mocks.js | |
| parent | 3c0c7165e26ec53bc408a6cca367e11f0433682a (diff) | |
| download | angular.js-3079a6f4e097a777414b8c3a8a87b8e1e20b55b5.tar.bz2 | |
fix(ngMock): keep withCredentials on passThrough
When using passThrough() and specifying withCredentials on the $http
call, the option is now passed to the underlying $httpBackend.
Diffstat (limited to 'src/ngMock/angular-mocks.js')
| -rw-r--r-- | src/ngMock/angular-mocks.js | 4 |
1 files changed, 2 insertions, 2 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; } |
