From 254b7ff66bf69673644aebcfbd76656980e9b3bd Mon Sep 17 00:00:00 2001 From: Alec Vulfson Date: Tue, 2 Aug 2016 16:41:24 -0400 Subject: [PATCH] Updated warning for boundary.circle --- sanitiser/_geo_reverse.js | 4 ++-- test/unit/sanitiser/_geo_reverse.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sanitiser/_geo_reverse.js b/sanitiser/_geo_reverse.js index 06785c44..3b031089 100644 --- a/sanitiser/_geo_reverse.js +++ b/sanitiser/_geo_reverse.js @@ -15,8 +15,8 @@ module.exports = function sanitize( raw, clean ){ return raw.hasOwnProperty('boundary.circle.' + field); }; - if (['lat', 'lon', 'radius'].some(hasBoundaryCircleField)) { - messages.warnings.push('boundary.circle is currently unsupported'); + if (['lat', 'lon'].some(hasBoundaryCircleField)) { + messages.warnings.push('boundary.circle.lat/boundary.circle.lon are currently unsupported'); } try { diff --git a/test/unit/sanitiser/_geo_reverse.js b/test/unit/sanitiser/_geo_reverse.js index 480d06b2..2f6a30c6 100644 --- a/test/unit/sanitiser/_geo_reverse.js +++ b/test/unit/sanitiser/_geo_reverse.js @@ -16,7 +16,7 @@ module.exports.tests.sanitize_boundary_country = function(test, common) { t.equals(clean['boundary.circle.lat'], 12.121212, 'should be set to point.lat'); t.deepEquals(errorsAndWarnings, { errors: [], - warnings: ['boundary.circle is currently unsupported'] + warnings: ['boundary.circle.lat/boundary.circle.lon are currently unsupported'] }, 'no warnings/errors'); t.end(); }); @@ -33,7 +33,7 @@ module.exports.tests.sanitize_boundary_country = function(test, common) { t.equals(clean['boundary.circle.lon'], 21.212121, 'should be set to point.lon'); t.deepEquals(errorsAndWarnings, { errors: [], - warnings: ['boundary.circle is currently unsupported'] + warnings: ['boundary.circle.lat/boundary.circle.lon are currently unsupported'] }, 'no warnings/errors'); t.end(); }); @@ -50,7 +50,7 @@ module.exports.tests.sanitize_boundary_country = function(test, common) { // t.equals(clean['boundary.circle.radius'], 12.121212, 'should be set to point.lat') t.deepEquals(errorsAndWarnings, { errors: [], - warnings: ['boundary.circle is currently unsupported'] + warnings: [] }, 'no warnings/errors'); t.end(); });