resDoesReturn(funcName, dataToReturn)
This function is synonymous with the 'doesReturn' function except here we are defining what is returned from a mocked function on the HTTP Response object. i.e. Defines what to return during a success scenario from a synchronous mocked function on the HTTP Response object.
Ordering matters when defining the response from mocked functions. The first time your mock is called, Maddox will return the response of the first defined response from 'doesReturn' or one of its variants.
- mockName {String} - This is the key for the mock. It should match the key from 'mockThisFunction'.
- funcName {String} - The name of the function to be mocked. Should match the name from 'mockThisFunction'.
- dataToReturn {Any} - The data that will be returned when this mocked function is executed.
- returns {Scenario}