From 092ddc3fd0a46308855bf07364fc3a27299a698d Mon Sep 17 00:00:00 2001 From: Harish Krishna Date: Mon, 8 Dec 2014 18:20:50 -0500 Subject: [PATCH] getting all available parts of the local, regional array --- helper/outputGenerator.js | 1 - test/unit/controller/doc.js | 4 ++-- test/unit/controller/search.js | 4 ++-- test/unit/controller/suggest.js | 4 ++-- test/unit/controller/suggest_nearby.js | 4 ++-- test/unit/helper/geojsonify.js | 6 +++--- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/helper/outputGenerator.js b/helper/outputGenerator.js index 53ae1fb1..fcb891e4 100644 --- a/helper/outputGenerator.js +++ b/helper/outputGenerator.js @@ -16,7 +16,6 @@ module.exports = function( record ){ var rec = record[schemaArr[i]]; if (rec && rec.length) { parts.push( rec ); - return parts; } } return parts; diff --git a/test/unit/controller/doc.js b/test/unit/controller/doc.js index 02090257..8a5a2f6e 100644 --- a/test/unit/controller/doc.js +++ b/test/unit/controller/doc.js @@ -30,7 +30,7 @@ module.exports.tests.functional_success = function(test, common) { admin0: 'country1', admin1: 'state1', admin2: 'city1', - text: 'test name1, city1, state1' + text: 'test name1, city1, state1, country1' } }, { type: 'Feature', @@ -46,7 +46,7 @@ module.exports.tests.functional_success = function(test, common) { admin0: 'country2', admin1: 'state2', admin2: 'city2', - text: 'test name2, city2, state2' + text: 'test name2, city2, state2, country2' } }]; diff --git a/test/unit/controller/search.js b/test/unit/controller/search.js index 19482eb9..f975e758 100644 --- a/test/unit/controller/search.js +++ b/test/unit/controller/search.js @@ -31,7 +31,7 @@ module.exports.tests.functional_success = function(test, common) { admin0: 'country1', admin1: 'state1', admin2: 'city1', - text: 'test name1, city1, state1' + text: 'test name1, city1, state1, country1' } }, { type: 'Feature', @@ -47,7 +47,7 @@ module.exports.tests.functional_success = function(test, common) { admin0: 'country2', admin1: 'state2', admin2: 'city2', - text: 'test name2, city2, state2' + text: 'test name2, city2, state2, country2' } }]; diff --git a/test/unit/controller/suggest.js b/test/unit/controller/suggest.js index c32f2336..55c70db7 100644 --- a/test/unit/controller/suggest.js +++ b/test/unit/controller/suggest.js @@ -31,7 +31,7 @@ module.exports.tests.functional_success = function(test, common) { admin0: 'country1', admin1: 'state1', admin2: 'city1', - text: 'test name1, city1, state1' + text: 'test name1, city1, state1, country1' } }, { type: 'Feature', @@ -47,7 +47,7 @@ module.exports.tests.functional_success = function(test, common) { admin0: 'country2', admin1: 'state2', admin2: 'city2', - text: 'test name2, city2, state2' + text: 'test name2, city2, state2, country2' } }]; diff --git a/test/unit/controller/suggest_nearby.js b/test/unit/controller/suggest_nearby.js index 062ca519..428b2bb6 100644 --- a/test/unit/controller/suggest_nearby.js +++ b/test/unit/controller/suggest_nearby.js @@ -31,7 +31,7 @@ module.exports.tests.functional_success = function(test, common) { admin0: 'country1', admin1: 'state1', admin2: 'city1', - text: 'test name1, city1, state1' + text: 'test name1, city1, state1, country1' } }, { type: 'Feature', @@ -47,7 +47,7 @@ module.exports.tests.functional_success = function(test, common) { admin0: 'country2', admin1: 'state2', admin2: 'city2', - text: 'test name2, city2, state2' + text: 'test name2, city2, state2, country2' } }]; diff --git a/test/unit/helper/geojsonify.js b/test/unit/helper/geojsonify.js index f1ec5fcb..b971a7aa 100644 --- a/test/unit/helper/geojsonify.js +++ b/test/unit/helper/geojsonify.js @@ -116,7 +116,7 @@ module.exports.tests.search = function(test, common) { 'id': 'id1', 'type': 'type1', 'layer': 'type1', - 'text': '\'Round Midnight Jazz and Blues Bar, test3, Angel', + 'text': '\'Round Midnight Jazz and Blues Bar, test3, Angel, test1, test2, United Kingdom, Islington', 'name': '\'Round Midnight Jazz and Blues Bar', 'alpha3': 'GBR', 'admin0': 'United Kingdom', @@ -141,7 +141,7 @@ module.exports.tests.search = function(test, common) { 'id': 'id2', 'type': 'type2', 'layer': 'type2', - 'text': 'Blues Cafe, test3, Smithfield', + 'text': 'Blues Cafe, test3, Smithfield, test1, test2, United Kingdom, City And County Of The City Of London', 'name': 'Blues Cafe', 'alpha3': 'GBR', 'admin0': 'United Kingdom', @@ -166,7 +166,7 @@ module.exports.tests.search = function(test, common) { 'id': '34633854', 'type': 'osmway', 'layer': 'osmway', - 'text': 'Empire State Building, Manhattan, NY', + 'text': 'Empire State Building, Manhattan, New York, Koreatown, NY, United States', 'name': 'Empire State Building', 'alpha3': 'USA', 'admin0': 'United States',