You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/10/01 22:51:01 UTC
usergrid git commit: integration tests: handle null
Repository: usergrid
Updated Branches:
refs/heads/2.1-release 62f41d011 -> f3d5fb552
integration tests: handle null
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f3d5fb55
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f3d5fb55
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f3d5fb55
Branch: refs/heads/2.1-release
Commit: f3d5fb5529952473bee0b3e07cfaebdc6f51d657
Parents: 62f41d0
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Oct 1 14:50:58 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Thu Oct 1 14:50:58 2015 -0600
----------------------------------------------------------------------
stack/rest_integration_tests/lib/entities.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f3d5fb55/stack/rest_integration_tests/lib/entities.js
----------------------------------------------------------------------
diff --git a/stack/rest_integration_tests/lib/entities.js b/stack/rest_integration_tests/lib/entities.js
index d9633a7..fcdcfb9 100644
--- a/stack/rest_integration_tests/lib/entities.js
+++ b/stack/rest_integration_tests/lib/entities.js
@@ -69,8 +69,9 @@ module.exports = {
body: options
}, function(e, r, body) {
var error = responseLib.getError(e, r);
- !error && returnBody.push(body.entities[0]);
- cb(error, error ? error : body.entities[0]);
+ var entity = body && body.entities ? body.entities.pop() : null;
+ entity && returnBody.push(entity);
+ cb(error, error ? error : entity);
});
}, function(err,bodies) {
cb(err,returnBody);