make the mock client get method async

and update worker tests to use async value
This commit is contained in:
2016-05-16 15:03:20 -07:00
parent 8d21dc6967
commit be1eb81059
2 changed files with 20 additions and 11 deletions

View File

@@ -45,14 +45,14 @@ Client.prototype.get = function (params = {}, source = {}) {
status: 'pending'
}, source);
return {
return Promise.resolve({
_index: params.index || 'index',
_type: params.type || DEFAULT_SETTING_DOCTYPE,
_id: params.id || 'AVRPRLnlp7Ur1SZXfT-T',
_version: params.version || 1,
found: true,
_source: _source
};
});
};
Client.prototype.search = function (params = {}, count = 5, source = {}) {