1
0
Fork 0

fixed test that failed on the client

This commit is contained in:
Jan Steemann 2013-03-25 17:29:29 +01:00
parent 9a60c46fac
commit f3bffb2553
1 changed files with 9 additions and 2 deletions

View File

@ -207,13 +207,20 @@ function AttributesSuite () {
var doc = { a: [ sub ] };
sub.cycle = doc;
try {
c.save(doc);
fail();
}
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
}
}
}