diff options
| author | Santi Albo | 2013-08-09 11:36:37 +0100 |
|---|---|---|
| committer | Igor Minar | 2013-08-09 10:08:36 -0700 |
| commit | 61cb4085d421060edfb98d7eae0a43b615542843 (patch) | |
| tree | ad18b5cceb7224fa9f5552566576b31c03a193f8 | |
| parent | 0c399bc546b9d62b96cfe30678c464aa69426a5d (diff) | |
| download | angular.js-61cb4085d421060edfb98d7eae0a43b615542843.tar.bz2 | |
docs(httpBackend): update documentation for expect methods
`expect` methods can receive an Object as the data parameter, which was
undocumented.
| -rw-r--r-- | src/ngMock/angular-mocks.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index ff2d79d4..791cd427 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -1246,8 +1246,9 @@ function createHttpBackendMock($rootScope, $delegate, $browser) { * * @param {string} method HTTP method. * @param {string|RegExp} url HTTP url. - * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives - * data string and returns true if the data is as expected. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header * object and returns true if the headers match the current expectation. * @returns {requestHandler} Returns an object with `respond` method that control how a matched @@ -1316,8 +1317,9 @@ function createHttpBackendMock($rootScope, $delegate, $browser) { * Creates a new request expectation for POST requests. For more info see `expect()`. * * @param {string|RegExp} url HTTP url. - * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives - * data string and returns true if the data is as expected. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. * @param {Object=} headers HTTP headers. * @returns {requestHandler} Returns an object with `respond` method that control how a matched * request is handled. @@ -1331,8 +1333,9 @@ function createHttpBackendMock($rootScope, $delegate, $browser) { * Creates a new request expectation for PUT requests. For more info see `expect()`. * * @param {string|RegExp} url HTTP url. - * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives - * data string and returns true if the data is as expected. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. * @param {Object=} headers HTTP headers. * @returns {requestHandler} Returns an object with `respond` method that control how a matched * request is handled. @@ -1346,8 +1349,9 @@ function createHttpBackendMock($rootScope, $delegate, $browser) { * Creates a new request expectation for PATCH requests. For more info see `expect()`. * * @param {string|RegExp} url HTTP url. - * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives - * data string and returns true if the data is as expected. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. * @param {Object=} headers HTTP headers. * @returns {requestHandler} Returns an object with `respond` method that control how a matched * request is handled. |
