From 89f35d3a49813f0446bd1cdd1ee59190865dd20b Mon Sep 17 00:00:00 2001 From: jlukic Date: Tue, 12 May 2015 18:44:47 -0400 Subject: [PATCH] Fix bug in mockResponseAsync --- src/definitions/behaviors/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definitions/behaviors/api.js b/src/definitions/behaviors/api.js index bd8e37405..c8b57af16 100644 --- a/src/definitions/behaviors/api.js +++ b/src/definitions/behaviors/api.js @@ -474,7 +474,7 @@ $.api = $.fn.api = function(parameters) { else if( $.isFunction(settings.mockResponseAsync) ) { callback = function(response) { module.verbose('Async callback returned response', response); - module.request.resolveWith(context, response); + module.request.resolveWith(context, [response]); }; module.debug('Using async mocked response', settings.mockResponseAsync); settings.mockResponseAsync.call(context, settings, callback);