mirror of https://gitee.com/bigwinds/arangodb
fixed test that failed on the client
This commit is contained in:
parent
9a60c46fac
commit
f3bffb2553
|
@ -207,13 +207,20 @@ function AttributesSuite () {
|
||||||
var doc = { a: [ sub ] };
|
var doc = { a: [ sub ] };
|
||||||
|
|
||||||
sub.cycle = doc;
|
sub.cycle = doc;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
c.save(doc);
|
c.save(doc);
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
assertEqual(ERRORS.ERROR_ARANGO_SHAPER_FAILED.code, err.errorNum);
|
if (err && err.errorNum) {
|
||||||
|
// we're on the server
|
||||||
|
assertEqual(ERRORS.ERROR_ARANGO_SHAPER_FAILED.code, err.errorNum);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// we're on the client, and the JS engine just throws a generic type error
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue