mirror of https://gitee.com/bigwinds/arangodb
added test case
This commit is contained in:
parent
0a883f4076
commit
69fc6e1662
|
@ -215,6 +215,22 @@ function CollectionDocumentSuite () {
|
|||
wait(0.0);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief create a document w/ invalid primary key data types
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSaveInvalidDocumentKeyType : function () {
|
||||
[ 1, 2, 3, false, true, null, [ ], { } ].forEach(function (key) {
|
||||
try {
|
||||
collection.save({ _key: key });
|
||||
fail();
|
||||
}
|
||||
catch (err) {
|
||||
assertEqual(ERRORS.ERROR_ARANGO_DOCUMENT_KEY_BAD.code, err.errorNum);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief create a document w/ primary key violation
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue