mirror of https://github.com/pelias/api.git
Browse Source
Some of the tests were checking the entire clean object, when they only cared about one tiny element. This made making changes really hard.pull/271/head
Julian Simioni
9 years ago
2 changed files with 9 additions and 43 deletions
@ -1,24 +0,0 @@
|
||||
|
||||
var text = require('../../../sanitiser/_text'), |
||||
parser = require('../../../helper/query_parser'), |
||||
allLayers = [ 'geoname', 'osmnode', 'osmway', 'admin0', 'admin1', 'admin2', 'neighborhood', |
||||
'locality', 'local_admin', 'osmaddress', 'openaddresses' ], |
||||
defaultParsed= { }, |
||||
defaultClean = { text: 'test', |
||||
layers: allLayers, |
||||
size: 10, |
||||
parsed_text: defaultParsed, |
||||
lat:0, |
||||
lon:0 |
||||
}, |
||||
getTargetLayers = function(query) { |
||||
var address = parser.get_parsed_address(query); |
||||
return address.target_layer; |
||||
}; |
||||
|
||||
|
||||
module.exports = { |
||||
defaultParsed: defaultParsed, |
||||
defaultClean : defaultClean, |
||||
getTargetLayers: getTargetLayers |
||||
}; |
Loading…
Reference in new issue