Merge pull request #342 from realm/al-fix-throws

fix for test bug in test harness for queries that should throw
This commit is contained in:
Ari Lazier 2016-03-21 14:04:22 -07:00
commit f13cd0a245
1 changed files with 4 additions and 2 deletions

View File

@ -102,9 +102,11 @@ function runQuerySuite(suite) {
}));
}
else if (test[0] == "QueryThrows") {
var type = test[1];
var args = getArgs(2);
var objects = realm.objects(type);
TestCase.assertThrows(function() {
var args = getArgs(2);
realm.objects.apply(realm, args);
objects.filtered.apply(objects, args);
}, "Expected exception not thrown for query: " + JSON.stringify(args));
}
else if (test[0] != "Disabled") {