Browse Source

Add null island bounding box test

pull/304/head
Julian Simioni 9 years ago
parent
commit
29a78db403
  1. 17
      test/unit/sanitiser/_geo_common.js

17
test/unit/sanitiser/_geo_common.js

@ -172,6 +172,23 @@ module.exports.tests.rect = function(test, common) {
t.end(); t.end();
}); });
test('valid rect quad, null island', function (t) {
var clean = {};
var params = {
'boundary.rect.min_lat': 0,
'boundary.rect.max_lat': 0,
'boundary.rect.min_lon': 0,
'boundary.rect.max_lon': 0
};
var mandatory = false;
sanitize.sanitize_rect( 'boundary.rect', clean, params, mandatory );
t.equal(clean['boundary.rect.min_lat'], params['boundary.rect.min_lat'], 'min_lat approved');
t.equal(clean['boundary.rect.max_lat'], params['boundary.rect.max_lat'], 'min_lat approved');
t.equal(clean['boundary.rect.min_lon'], params['boundary.rect.min_lon'], 'min_lat approved');
t.equal(clean['boundary.rect.max_lon'], params['boundary.rect.max_lon'], 'min_lat approved');
t.end();
});
test('invalid rect - partially specified', function (t) { test('invalid rect - partially specified', function (t) {
var clean = {}; var clean = {};
var params = { var params = {

Loading…
Cancel
Save