diff options
| author | Bruno Baia | 2013-11-19 00:30:36 +0100 | 
|---|---|---|
| committer | Pawel Kozlowski | 2014-03-15 19:41:07 +0100 | 
| commit | b8cc71d476f76ff51e719fb76fb2348027c858ce (patch) | |
| tree | c65b60a2dda24519a108459c404da955f3894bc0 /test/ng/httpSpec.js | |
| parent | 511422adb08beb6bc33e048a31cb5aaa01408b84 (diff) | |
| download | angular.js-b8cc71d476f76ff51e719fb76fb2348027c858ce.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.js | 10 | 
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', { | 
