aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng
diff options
context:
space:
mode:
authorHendrixer2014-01-11 15:20:54 -0800
committerVojta Jina2014-01-13 16:50:15 -0800
commite1cfb1957feaf89408bccf48fae6f529e57a82fe (patch)
tree4d3ebdb06507184098eff3fcff3ba0cc137de250 /test/ng
parent2a3586381fd5016bc51ad9d97fde1a5c7e3990d8 (diff)
downloadangular.js-e1cfb1957feaf89408bccf48fae6f529e57a82fe.tar.bz2
fix($http): ensure default headers PUT and POST are different objects
Send PUT and POST through copy() to make sure they are not the same. Closes #5742 Closes #5747 Closes #5764
Diffstat (limited to 'test/ng')
-rw-r--r--test/ng/httpSpec.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ng/httpSpec.js b/test/ng/httpSpec.js
index d3653a67..a0417d9a 100644
--- a/test/ng/httpSpec.js
+++ b/test/ng/httpSpec.js
@@ -1439,6 +1439,12 @@ describe('$http', function() {
$http.get('/url');
$httpBackend.flush();
});
+
+ it('should have seperate opbjects for defaults PUT and POST', function() {
+ expect($http.defaults.headers.post).not.toBe($http.defaults.headers.put);
+ expect($http.defaults.headers.post).not.toBe($http.defaults.headers.patch);
+ expect($http.defaults.headers.put).not.toBe($http.defaults.headers.patch);
+ })
});
});