Browse Source

Fix debug #2059 #2070

pull/2169/head
jlukic 9 years ago
parent
commit
618e7839a1
1 changed files with 3 additions and 2 deletions
  1. 5
      src/definitions/behaviors/api.js

5
src/definitions/behaviors/api.js

@ -463,11 +463,11 @@ $.api = $.fn.api = function(parameters) {
if( module.is.mocked() ) {
if(settings.mockResponse) {
if($.isFunction(settings.mockResponse)) {
module.verbose('Using sync mocked response callback', settings.mockResponse);
module.debug('Using sync mocked response callback', settings.mockResponse);
module.request.resolveWith(context, [ settings.mockResponse.call(context, settings) ]);
}
else {
module.verbose('Using mocked response', settings.mockResponse);
module.debug('Using mocked response', settings.mockResponse);
module.request.resolveWith(context, [ settings.mockResponse ]);
}
}
@ -476,6 +476,7 @@ $.api = $.fn.api = function(parameters) {
module.verbose('Async callback returned response', response);
module.request.resolveWith(context, response);
};
module.debug('Using async mocked response', settings.mockResponseAsync);
settings.mockResponseAsync.call(context, settings, callback);
}
}

Loading…
Cancel
Save