|
|
@ -225,8 +225,8 @@ module.exports.tests.success_conditions = (test, common) => { |
|
|
|
callback(null, { |
|
|
|
callback(null, { |
|
|
|
properties: { |
|
|
|
properties: { |
|
|
|
number: 17, |
|
|
|
number: 17, |
|
|
|
source: 'OSM', |
|
|
|
source: 'Source Abbr 1', |
|
|
|
source_id: 'openstreetmap source id', |
|
|
|
source_id: 'source 1 source id', |
|
|
|
lat: 12.121212, |
|
|
|
lat: 12.121212, |
|
|
|
lon: 21.212121 |
|
|
|
lon: 21.212121 |
|
|
|
} |
|
|
|
} |
|
|
@ -236,8 +236,8 @@ module.exports.tests.success_conditions = (test, common) => { |
|
|
|
callback(null, { |
|
|
|
callback(null, { |
|
|
|
properties: { |
|
|
|
properties: { |
|
|
|
number: 18, |
|
|
|
number: 18, |
|
|
|
source: 'OA', |
|
|
|
source: 'Source Abbr 2', |
|
|
|
source_id: 'openaddresses source id', |
|
|
|
source_id: 'source 2 source id', |
|
|
|
lat: 13.131313, |
|
|
|
lat: 13.131313, |
|
|
|
lon: 31.313131 |
|
|
|
lon: 31.313131 |
|
|
|
} |
|
|
|
} |
|
|
@ -264,7 +264,13 @@ module.exports.tests.success_conditions = (test, common) => { |
|
|
|
const logger = require('pelias-mock-logger')(); |
|
|
|
const logger = require('pelias-mock-logger')(); |
|
|
|
|
|
|
|
|
|
|
|
const controller = proxyquire('../../../middleware/interpolate', { |
|
|
|
const controller = proxyquire('../../../middleware/interpolate', { |
|
|
|
'pelias-logger': logger |
|
|
|
'pelias-logger': logger, |
|
|
|
|
|
|
|
'../helper/type_mapping': { |
|
|
|
|
|
|
|
source_mapping: { |
|
|
|
|
|
|
|
'source abbr 1': ['full source name 1'], |
|
|
|
|
|
|
|
'source abbr 2': ['full source name 2'] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
})(service, () => true); |
|
|
|
})(service, () => true); |
|
|
|
|
|
|
|
|
|
|
|
const req = { |
|
|
|
const req = { |
|
|
@ -331,8 +337,8 @@ module.exports.tests.success_conditions = (test, common) => { |
|
|
|
name: { |
|
|
|
name: { |
|
|
|
default: '17 street name 1' |
|
|
|
default: '17 street name 1' |
|
|
|
}, |
|
|
|
}, |
|
|
|
source: 'openstreetmap', |
|
|
|
source: 'full source name 1', |
|
|
|
source_id: 'openstreetmap source id', |
|
|
|
source_id: 'source 1 source id', |
|
|
|
address_parts: { |
|
|
|
address_parts: { |
|
|
|
number: 17 |
|
|
|
number: 17 |
|
|
|
}, |
|
|
|
}, |
|
|
@ -348,8 +354,8 @@ module.exports.tests.success_conditions = (test, common) => { |
|
|
|
name: { |
|
|
|
name: { |
|
|
|
default: '18 street name 3' |
|
|
|
default: '18 street name 3' |
|
|
|
}, |
|
|
|
}, |
|
|
|
source: 'openaddresses', |
|
|
|
source: 'full source name 2', |
|
|
|
source_id: 'openaddresses source id', |
|
|
|
source_id: 'source 2 source id', |
|
|
|
address_parts: { |
|
|
|
address_parts: { |
|
|
|
number: 18 |
|
|
|
number: 18 |
|
|
|
}, |
|
|
|
}, |
|
|
|