add support for geoWithin.centerSphere queries via withJSON (#4825)

* add support for geoWithin.centerSphere queries via withJSON

* added test for passing array of lat, lng instead of Parse.GeoPoint

* added postgres support

* added more tests

* improved tests and validation

* added more tests
This commit is contained in:
Manuel
2018-06-12 18:41:02 +02:00
committed by Florent Vilmart
parent f2f92858f1
commit cddb924703
4 changed files with 203 additions and 40 deletions

View File

@@ -294,11 +294,13 @@ function expectError(errorCode, callback) {
error: function(obj, e) {
// Some methods provide 2 parameters.
e = e || obj;
if (!e) {
fail('expected a specific error but got a blank error');
return;
if (errorCode !== undefined) {
if (!e) {
fail('expected a specific error but got a blank error');
return;
}
expect(e.code).toEqual(errorCode, e.message);
}
expect(e.code).toEqual(errorCode, e.message);
if (callback) {
callback(e);
}