mirror of https://gitee.com/bigwinds/arangodb
Added tests for EDGES to work with Object input
This commit is contained in:
parent
cd7b249e07
commit
c6e64fc99d
|
@ -386,13 +386,34 @@ function ahuacatlQueryEdgesTestSuite () {
|
||||||
queries.forEach(function (q) {
|
queries.forEach(function (q) {
|
||||||
var actual;
|
var actual;
|
||||||
actual = getQueryResults(q, {start: [ "UnitTestsAhuacatlVertex/v1", "UnitTestsAhuacatlVertex/v2" ]});
|
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" ]);
|
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" ]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue