aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/httpSpec.js
diff options
context:
space:
mode:
authorBruno Baia2013-11-19 00:30:36 +0100
committerIgor Minar2014-03-16 09:52:44 -0700
commitfbb125a3af164e52af2f8119175b04cbbed2f331 (patch)
tree93cab555e478c4bb62727901522e01ac89fc14a4 /test/ng/httpSpec.js
parentca7336391aba0f1c76b89381742716e98df67576 (diff)
downloadangular.js-fbb125a3af164e52af2f8119175b04cbbed2f331.tar.bz2
fix($http): allow sending Blob data using $http
Closes #5012
Diffstat (limited to 'test/ng/httpSpec.js')
-rw-r--r--test/ng/httpSpec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ng/httpSpec.js b/test/ng/httpSpec.js
index a7b24483..86ab72ea 100644
--- a/test/ng/httpSpec.js
+++ b/test/ng/httpSpec.js
@@ -989,6 +989,16 @@ describe('$http', function() {
});
+ it('should ignore Blob objects', function () {
+ if (!window.Blob) return;
+
+ var blob = new Blob(['blob!'], { type: 'text/plain' });
+
+ $httpBackend.expect('POST', '/url', '[object Blob]').respond('');
+ $http({ method: 'POST', url: '/url', data: blob });
+ });
+
+
it('should have access to request headers', function() {
$httpBackend.expect('POST', '/url', 'header1').respond(200);
$http.post('/url', 'req', {