diff options
Diffstat (limited to 'test/ng/httpSpec.js')
| -rw-r--r-- | test/ng/httpSpec.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ng/httpSpec.js b/test/ng/httpSpec.js index e6d1cf4f..5984106c 100644 --- a/test/ng/httpSpec.js +++ b/test/ng/httpSpec.js @@ -684,6 +684,15 @@ describe('$http', function() { $httpBackend.flush(); }); + it('should set default headers for PATCH request', function() { + $httpBackend.expect('PATCH', '/url', 'messageBody', function(headers) { + return headers['Accept'] == 'application/json, text/plain, */*' && + headers['Content-Type'] == 'application/json;charset=utf-8'; + }).respond(''); + + $http({url: '/url', method: 'PATCH', headers: {}, data: 'messageBody'}); + $httpBackend.flush(); + }); it('should set default headers for custom HTTP method', function() { $httpBackend.expect('FOO', '/url', undefined, function(headers) { |
