You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/03/27 23:21:04 UTC
[10/50] [abbrv] git commit: Updating test example to remove
'getOnExist'
Updating test example to remove 'getOnExist'
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/2d8e95f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/2d8e95f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/2d8e95f8
Branch: refs/pull/80/merge
Commit: 2d8e95f80c74a2245a1e2f60b330b85f6df9fb3c
Parents: 043a472
Author: ryan bridges <rb...@apigee.com>
Authored: Fri Mar 21 14:37:33 2014 -0400
Committer: ryan bridges <rb...@apigee.com>
Committed: Fri Mar 21 14:37:33 2014 -0400
----------------------------------------------------------------------
sdks/html5-javascript/examples/test/test.js | 40 +++++++-----------------
1 file changed, 12 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2d8e95f8/sdks/html5-javascript/examples/test/test.js
----------------------------------------------------------------------
diff --git a/sdks/html5-javascript/examples/test/test.js b/sdks/html5-javascript/examples/test/test.js
index 6f5f0de..ff9dc82 100755
--- a/sdks/html5-javascript/examples/test/test.js
+++ b/sdks/html5-javascript/examples/test/test.js
@@ -860,36 +860,20 @@ function createExistingEntity(step, marty) {
}
client.createEntity(options, function (err, newdog) {
if (err) {
- error('Create new entity to use for existing entity failed');
+ success('Create new entity to use for existing entity failed');
} else {
- success('Create new entity to use for existing entity succeeded');
-
- var newuuid = newdog.get('uuid');
- if (newuuid === uuid) {
- success('UUIDs of new and old entities match');
- } else {
- error('UUIDs of new and old entities do not match');
- }
-
- var breed = newdog.get('breed');
- if (breed === 'mutt') {
- success('attribute sucesfully set on new entity');
+ error('Create new entity to use for existing entity succeeded');
+ }
+ dog.destroy(function(err){
+ if (err){
+ error('existing entity not deleted from database');
} else {
- error('attribute not sucesfully set on new entity');
+ success('existing entity deleted from database');
+ dog = null; //blow away the local object
+ newdog = null; //blow away the local object
+ runner(step);
}
-
- newdog.destroy(function(err){
- if (err){
- error('existing entity not deleted from database');
- } else {
- success('existing entity deleted from database');
- dog = null; //blow away the local object
- newdog = null; //blow away the local object
- runner(step);
- }
- });
-
- }
+ });
});
}
});
@@ -989,4 +973,4 @@ function cleanUpDogs(step){
}
});
}
-});
\ No newline at end of file
+});