   test.equal dijkstra[0].end, n4.get().id
 
   test.equal allSimplePaths.length, 2
-  test.equal allSimplePaths[0].directions, [ '<-', '<-' ]
-  test.equal allSimplePaths[0].start, n4.get().id
-  test.equal allSimplePaths[0].nodes, [n4.get().id, n3.get().id, n1.get().id]
-  test.equal allSimplePaths[0].length, 2
-  test.equal allSimplePaths[0].relationships, [r4.get().id, r1.get().id]
-  test.equal allSimplePaths[0].end, n1.get().id
-
-  test.equal allSimplePaths[1].directions, [ '<-', '<-', '<-' ]
-  test.equal allSimplePaths[1].start, n4.get().id
-  test.equal allSimplePaths[1].nodes, [n4.get().id, n3.get().id, n2.get().id, n1.get().id]
-  test.equal allSimplePaths[1].length, 3
-  test.equal allSimplePaths[1].relationships, [r4.get().id, r3.get().id, r2.get().id]
-  test.equal allSimplePaths[1].end, n1.get().id
+  i = -1
+  while ++i < allSimplePaths.length
+    if allSimplePaths[i].length is 2
+      test.equal allSimplePaths[i].directions, [ '<-', '<-' ]
+      test.equal allSimplePaths[i].start, n4.get().id
+      test.equal allSimplePaths[i].nodes, [n4.get().id, n3.get().id, n1.get().id]
+      test.equal allSimplePaths[i].length, 2
+      test.equal allSimplePaths[i].relationships, [r4.get().id, r1.get().id]
+      test.equal allSimplePaths[i].end, n1.get().id
+    if allSimplePaths[i].length is 3
+      test.equal allSimplePaths[i].directions, [ '<-', '<-', '<-' ]
+      test.equal allSimplePaths[i].start, n4.get().id
+      test.equal allSimplePaths[i].nodes, [n4.get().id, n3.get().id, n2.get().id, n1.get().id]
+      test.equal allSimplePaths[i].length, 3
+      test.equal allSimplePaths[i].relationships, [r4.get().id, r3.get().id, r2.get().id]
+      test.equal allSimplePaths[i].end, n1.get().id
 
   test.equal allPaths.length, 2
-  test.equal allPaths[0].directions, [ '->', '->' ]
-  test.equal allPaths[0].start, n1.get().id
-  test.equal allPaths[0].nodes, [n1.get().id, n3.get().id, n4.get().id]
-  test.equal allPaths[0].length, 2
-  test.equal allPaths[0].relationships, [r1.get().id, r4.get().id]
-  test.equal allPaths[0].end, n4.get().id
-
-  test.equal allPaths[1].directions, [ '->', '->', '->' ]
-  test.equal allPaths[1].start, n1.get().id
-  test.equal allPaths[1].nodes, [n1.get().id, n2.get().id, n3.get().id, n4.get().id]
-  test.equal allPaths[1].length, 3
-  test.equal allPaths[1].relationships, [r2.get().id, r3.get().id, r4.get().id]
-  test.equal allPaths[1].end, n4.get().id
+  i = -1
+  while ++i < allPaths.length
+    if allPaths[i].length is 2
+      test.equal allPaths[i].directions, [ '->', '->' ]
+      test.equal allPaths[i].start, n1.get().id
+      test.equal allPaths[i].nodes, [n1.get().id, n3.get().id, n4.get().id]
+      test.equal allPaths[i].length, 2
+      test.equal allPaths[i].relationships, [r1.get().id, r4.get().id]
+      test.equal allPaths[i].end, n4.get().id
+
+    if allPaths[i].length is 3
+      test.equal allPaths[i].directions, [ '->', '->', '->' ]
+      test.equal allPaths[i].start, n1.get().id
+      test.equal allPaths[i].nodes, [n1.get().id, n2.get().id, n3.get().id, n4.get().id]
+      test.equal allPaths[i].length, 3
+      test.equal allPaths[i].relationships, [r2.get().id, r3.get().id, r4.get().id]
+      test.equal allPaths[i].end, n4.get().id
 
   test.equal shortestPath.length, 1
   test.equal shortestPath[0].directions, [ '->', '->' ]

db.graph()
###
Tinytest.addAsync 'Neo4jDB - db.graph - (String) [BASICS]', (test, completed) ->
  db.querySync "CREATE (a:FirstTest)-[r:KNOWS]->(b:SecondTest), (a:FirstTest)-[r2:WorkWith]->(c:ThirdTest), (c:ThirdTest)-[r3:KNOWS]->(b:SecondTest)"
  graph = db.graph "MATCH ()-[r]-() RETURN r"
  test.instanceOf graph, Neo4jCursor
  i = 0

    property_keys: [ 'uuid' ]

  node = db.nodes({uuid: "#{Math.floor(Math.random()*(999999999-1+1)+1)}"}).labels.set('Special')
  test.equal _.pick((db.index.create('Special', ['uuid']) || {}), 'label', 'property_keys'), res
  test.equal [_.pick((db.index.get('Special')[0] || {}), 'label', 'property_keys')], [res]
  test.equal db.index.drop('Special', 'uuid'), []
  node.delete()

