From 992f2455d5c73ee80c54633e538aca60fb7df836 Mon Sep 17 00:00:00 2001 From: Stephen Hess Date: Thu, 12 Jan 2017 15:36:04 -0500 Subject: [PATCH] renamed `query` parameter to `venue` --- sanitizer/_synthesize_analysis.js | 2 +- test/unit/sanitizer/_synthesize_analysis.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sanitizer/_synthesize_analysis.js b/sanitizer/_synthesize_analysis.js index 722038be..f26dfc6a 100644 --- a/sanitizer/_synthesize_analysis.js +++ b/sanitizer/_synthesize_analysis.js @@ -2,7 +2,7 @@ const _ = require('lodash'); const text_analyzer = require('pelias-text-analyzer'); const fields = { - 'query': 'query', + 'venue': 'query', 'address': 'address', 'neighbourhood': 'neighbourhood', 'borough': 'borough', diff --git a/test/unit/sanitizer/_synthesize_analysis.js b/test/unit/sanitizer/_synthesize_analysis.js index 7ca374c3..97d49b2a 100644 --- a/test/unit/sanitizer/_synthesize_analysis.js +++ b/test/unit/sanitizer/_synthesize_analysis.js @@ -12,7 +12,7 @@ module.exports.tests.text_parser = function(test, common) { }}); const raw = { - query: ' \t query \t value \t ', + venue: ' \t venue \t value \t ', neighbourhood: ' \t neighbourhood \t value \t ', borough: ' \t borough \t value \t ', locality: ' \t locality \t value \t ', @@ -26,7 +26,7 @@ module.exports.tests.text_parser = function(test, common) { const expected_clean = { parsed_text: { - query: 'query value', + query: 'venue value', neighbourhood: 'neighbourhood value', borough: 'borough value', city: 'locality value', @@ -59,7 +59,7 @@ module.exports.tests.text_parser = function(test, common) { } const raw = { - query: getInvalidValue(), + venue: getInvalidValue(), address: getInvalidValue(), neighbourhood: getInvalidValue(), borough: getInvalidValue(), @@ -80,7 +80,7 @@ module.exports.tests.text_parser = function(test, common) { t.deepEquals(clean, expected_clean); t.deepEquals(messages.errors, ['at least one of the following fields is required: ' + - 'query, address, neighbourhood, borough, locality, county, region, postalcode, country'], 'no errors'); + 'venue, address, neighbourhood, borough, locality, county, region, postalcode, country'], 'no errors'); t.deepEquals(messages.warnings, [], 'no warnings'); t.end(); @@ -103,7 +103,7 @@ module.exports.tests.text_parser = function(test, common) { t.deepEquals(clean, expected_clean); t.deepEquals(messages.errors, ['at least one of the following fields is required: ' + - 'query, address, neighbourhood, borough, locality, county, region, postalcode, country'], 'no errors'); + 'venue, address, neighbourhood, borough, locality, county, region, postalcode, country'], 'no errors'); t.deepEquals(messages.warnings, [], 'no warnings'); t.end();