diff --git a/js/server/tests/aql-graph.js b/js/server/tests/aql-graph.js index bb61de9810..a98add3325 100644 --- a/js/server/tests/aql-graph.js +++ b/js/server/tests/aql-graph.js @@ -386,13 +386,34 @@ function ahuacatlQueryEdgesTestSuite () { queries.forEach(function (q) { var actual; actual = getQueryResults(q, {start: [ "UnitTestsAhuacatlVertex/v1", "UnitTestsAhuacatlVertex/v2" ]}); + assertEqual(actual, [ "v1->v2", "v1->v3", "v2->v3" ]); + actual = getQueryResults(q, {start: [ {_id: "UnitTestsAhuacatlVertex/v1"}, {_id: "UnitTestsAhuacatlVertex/v2"} ]}); assertEqual(actual, [ "v1->v2", "v1->v3", "v2->v3" ]); }); + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief checks EDGES() +//////////////////////////////////////////////////////////////////////////////// + + testEdgesStartVertexObject : function () { + var queries = [ + "FOR e IN NOOPT(V8(EDGES(UnitTestsAhuacatlEdge, @start, 'outbound'))) SORT e.what RETURN e.what", + "FOR e IN EDGES(UnitTestsAhuacatlEdge, @start, 'outbound') SORT e.what RETURN e.what", + "FOR e IN NOOPT(EDGES(UnitTestsAhuacatlEdge, @start, 'outbound')) SORT e.what RETURN e.what" + ]; + + queries.forEach(function (q) { + var actual; + actual = getQueryResults(q, {start: { _id: "UnitTestsAhuacatlVertex/v1" }}); + assertEqual(actual, [ "v1->v2", "v1->v3" ]); + }); } + }; }