diff options
| author | Santi Albo | 2013-08-09 11:36:37 +0100 | 
|---|---|---|
| committer | Igor Minar | 2013-08-09 10:10:45 -0700 | 
| commit | 6da835f4bc746651e662f9f2bb6de6d85d77aa47 (patch) | |
| tree | bc2a4cbea8f9655524a513fdba734a61d3dd0101 | |
| parent | 5cca077e4a40a26cc2deee2a86a215f575f25b22 (diff) | |
| download | angular.js-6da835f4bc746651e662f9f2bb6de6d85d77aa47.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 | 16 | 
1 files changed, 12 insertions, 4 deletions
| diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index 6e258837..3f58b399 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -1088,7 +1088,9 @@ function createHttpBackendMock($delegate, $browser) {     *     * @param {string} method HTTP method.     * @param {string|RegExp} url HTTP url. -   * @param {(string|RegExp)=} data HTTP request body. +   * @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 @@ -1157,7 +1159,9 @@ function createHttpBackendMock($delegate, $browser) {     * Creates a new request expectation for POST requests. For more info see `expect()`.     *     * @param {string|RegExp} url HTTP url. -   * @param {(string|RegExp)=} data HTTP request body. +   * @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. @@ -1171,7 +1175,9 @@ function createHttpBackendMock($delegate, $browser) {     * Creates a new request expectation for PUT requests. For more info see `expect()`.     *     * @param {string|RegExp} url HTTP url. -   * @param {(string|RegExp)=} data HTTP request body. +   * @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. @@ -1185,7 +1191,9 @@ function createHttpBackendMock($delegate, $browser) {     * 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 {(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. | 
