Browse Source

Update tests and fixtures

pull/457/head
Diana Shkolnikov 9 years ago
parent
commit
74467e91e6
  1. 2
      test/unit/fixture/dedupe_elasticsearch_nonascii_results.js
  2. 22
      test/unit/fixture/dedupe_elasticsearch_results.js
  3. 6
      test/unit/fixture/search_full_address.js
  4. 4
      test/unit/fixture/search_regions_address.js
  5. 4
      test/unit/middleware/localNamingConventions.js

2
test/unit/fixture/dedupe_elasticsearch_nonascii_results.js

@ -55,7 +55,7 @@ module.exports = [
'name': {
'default': '万里加油站'
},
'address': {
'address_parts': {
'street': 'S308',
'postalcode': '312044'
},

22
test/unit/fixture/dedupe_elasticsearch_results.js

@ -4,7 +4,7 @@ module.exports = [
'lon': -76.207456,
'lat': 40.039265
},
'address': {},
'address_parts': {},
'parent': {
'localadmin': ['East Lampeter'],
'region_a': ['PA'],
@ -31,7 +31,7 @@ module.exports = [
'lon': -76.207456,
'lat': 40.039265
},
'address': {},
'address_parts': {},
'parent': {
'localadmin': ['East Lampeter'],
'region_a': ['PA'],
@ -58,7 +58,7 @@ module.exports = [
'lon': -76.23246,
'lat': 39.99288
},
'address': {},
'address_parts': {},
'parent': {
'localadmin': ['West Lampeter'],
'region_a': ['PA'],
@ -85,7 +85,7 @@ module.exports = [
'lon': -76.20746,
'lat': 40.03927
},
'address': {},
'address_parts': {},
'parent': {
'localadmin': ['East Lampeter'],
'region_a': ['PA'],
@ -112,7 +112,7 @@ module.exports = [
'lon': -76.232457,
'lat': 39.992877
},
'address': {},
'address_parts': {},
'parent': {
'region': ['Pennsylvania'],
'locality': ['Lampeter'],
@ -139,7 +139,7 @@ module.exports = [
'lon': -76.207456,
'lat': 40.038987
},
'address': {},
'address_parts': {},
'parent': {
'region': ['Pennsylvania'],
'locality': ['Smoketown'],
@ -166,7 +166,7 @@ module.exports = [
'lon': -76.20746,
'lat': 40.03899
},
'address': {},
'address_parts': {},
'parent': {
'region': ['Pennsylvania'],
'locality': ['Smoketown'],
@ -193,7 +193,7 @@ module.exports = [
'lon': -94.167445,
'lat': 38.762788
},
'address': {},
'address_parts': {},
'parent': {
'region': ['Missouri'],
'locality': ['Strasburg'],
@ -219,7 +219,7 @@ module.exports = [
'lon': -78.36317,
'lat': 38.98445
},
'address': {},
'address_parts': {},
'name': {
'default': 'Strasburg High School'
},
@ -245,7 +245,7 @@ module.exports = [
'lon': -100.16516,
'lat': 46.13427
},
'address': {},
'address_parts': {},
'name': {
'default': 'Strasburg High School'
},
@ -271,7 +271,7 @@ module.exports = [
'lon': -81.532392,
'lat': 40.597578
},
'address': {},
'address_parts': {},
'name': {
'default': 'Strasburg High School'
},

6
test/unit/fixture/search_full_address.js

@ -77,7 +77,7 @@ module.exports = {
}
},{
'match': {
'address.number': {
'address_parts.number': {
'query': '123',
'boost': vs['address:housenumber:boost'],
'analyzer': vs['address:housenumber:analyzer']
@ -85,7 +85,7 @@ module.exports = {
}
}, {
'match': {
'address.street': {
'address_parts.street': {
'query': 'main st',
'boost': vs['address:street:boost'],
'analyzer': vs['address:street:analyzer']
@ -93,7 +93,7 @@ module.exports = {
}
}, {
'match': {
'address.zip': {
'address_parts.zip': {
'query': '10010',
'boost': vs['address:postcode:boost'],
'analyzer': vs['address:postcode:analyzer']

4
test/unit/fixture/search_regions_address.js

@ -77,7 +77,7 @@ module.exports = {
}
},{
'match': {
'address.number': {
'address_parts.number': {
'query': '1',
'boost': vs['address:housenumber:boost'],
'analyzer': vs['address:housenumber:analyzer']
@ -85,7 +85,7 @@ module.exports = {
}
}, {
'match': {
'address.street': {
'address_parts.street': {
'query': 'water st',
'boost': vs['address:street:boost'],
'analyzer': vs['address:street:analyzer']

4
test/unit/middleware/localNamingConventions.js

@ -10,7 +10,7 @@ module.exports.tests.flipNumberAndStreet = function(test, common) {
'_type': 'test',
'name': { 'default': '1 Main St' },
'center_point': { 'lon': -7.131521, 'lat': 54.428866 },
'address': {
'address_parts': {
'zip': 'BT77 0BG',
'number': '1',
'street': 'Main St'
@ -27,7 +27,7 @@ module.exports.tests.flipNumberAndStreet = function(test, common) {
'_type': 'test',
'name': { 'default': '23 Grolmanstraße' },
'center_point': { 'lon': 13.321487, 'lat': 52.506781 },
'address': {
'address_parts': {
'zip': '10623',
'number': '23',
'street': 'Grolmanstraße'

Loading…
Cancel
Save