diff options
Diffstat (limited to 'src/ngMock/angular-mocks.js')
| -rw-r--r-- | src/ngMock/angular-mocks.js | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index 0b8f016f..a2d4f88b 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -1113,6 +1113,20 @@ function createHttpBackendMock($delegate, $browser) { /** * @ngdoc method + * @name angular.module.ngMock.$httpBackend#expectPATCH + * @methodOf angular.module.ngMock.$httpBackend + * @description + * Creates a new request expectation for PATCH requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method * @name angular.module.ngMock.$httpBackend#expectJSONP * @methodOf angular.module.ngMock.$httpBackend * @description @@ -1220,7 +1234,7 @@ function createHttpBackendMock($delegate, $browser) { } }); - angular.forEach(['PUT', 'POST'], function(method) { + angular.forEach(['PUT', 'POST', 'PATCH'], function(method) { $httpBackend[prefix + method] = function(url, data, headers) { return $httpBackend[prefix](method, url, data, headers) } @@ -1485,6 +1499,20 @@ angular.module('ngMockE2E', ['ng']).config(function($provide) { /** * @ngdoc method + * @name angular.module.ngMockE2E.$httpBackend#whenPATCH + * @methodOf angular.module.ngMockE2E.$httpBackend + * @description + * Creates a new backend definition for PATCH requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method * @name angular.module.ngMockE2E.$httpBackend#whenJSONP * @methodOf angular.module.ngMockE2E.$httpBackend * @description |
