Commit d7e9b763 authored by Patricio Bruna's avatar Patricio Bruna

test parseResponse with error null

parent 49e8aeed
......@@ -286,7 +286,7 @@ return /******/ (function(modules) { // webpackBootstrap
var response_name = that.dictionary.resourceResponseName(resource);
var response_object = data.get()[request_data.response_name][response_name][0];
var result = that.dictionary.classFactory(resource, response_object, that);
return callback(true, result);
return callback(null, result);
}
// For requests that returns empty Object when Success
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -177,7 +177,7 @@ export default class ZimbraAdminApi {
const response_name = that.dictionary.resourceResponseName(resource);
const response_object = data.get()[request_data.response_name][response_name][0];
const result = that.dictionary.classFactory(resource, response_object, that);
return callback(true, result);
return callback(null, result);
}
// For requests that returns empty Object when Success
......
......@@ -50,7 +50,6 @@
let api = new ZimbraAdminApi(auth_data);
let callback = function(err, response) {
if (err) return console.error(err);
console.log(api.client);
expect(api.client.token).to.exist;
done();
};
......@@ -134,6 +133,7 @@
let callback = function(err, data){
let domain_id = data.id;
api.getDomain(domain_id, function(err, data){
if (err) return console.error(err);
expect(data.name).to.equal('zboxapp.dev');
done();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment