1
0
Fork 0

added test case for bind parameters

This commit is contained in:
Jan Steemann 2012-05-16 15:45:05 +02:00
parent 8c28bd39c3
commit ac4621b315
1 changed files with 14 additions and 1 deletions

View File

@ -349,13 +349,26 @@ function ahuacatlBindTestSuite () {
/// @brief test collection bind variable
////////////////////////////////////////////////////////////////////////////////
testBindCollection : function () {
testBindCollection1 : function () {
var expected = [ 5, 63 ];
var actual = getQueryResults("FOR u IN @@collection FILTER u.value IN [ @value1, @value2 ] SORT u.value RETURN u.value", { "@collection" : numbers.name(), "value1" : 5, "value2" : 63 }, true);
assertEqual(expected, actual);
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test collection bind variable
////////////////////////////////////////////////////////////////////////////////
testBindCollection2 : function () {
var expected = [ 99 ];
var collection = numbers.name();
var paramName = "@" + collection;
var actual = getQueryResults("FOR " + collection + " IN @@" + collection + " FILTER u.value == 99 RETURN u.value", { paramName : collection }, true);
assertEqual(expected, actual);
},
////////////////////////////////////////////////////////////////////////////////
/// @brief test collection bind variable
////////////////////////////////////////////////////////////////////////////////