resShouldBeCalledWith(funcName, params)

This function is synonymous with the 'shouldBeCalledWith' function except here we are mocking a function on the HttpResponse object that is passed into the controller with the HttpRequest object. Common functions to mock here send, json, statusCode, etc. You can test the parameters of any function execution on the response object.

  • funcName {String} - The name of the function to be mocked on the HttpResponse object.
  • params {Object} - An object representing an HttpRequest object.
  • returns {HttpReqScenario}