|
|
@ -861,7 +861,7 @@ module.exports.tests.failure_conditions = (test, common) => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('service returns 0 length name', (t) => { |
|
|
|
test('service returns 0 length name', (t) => { |
|
|
|
t.plan(5); |
|
|
|
t.plan(6); |
|
|
|
|
|
|
|
|
|
|
|
const service = (req, callback) => { |
|
|
|
const service = (req, callback) => { |
|
|
|
t.deepEquals(req, { clean: { layers: ['neighbourhood'] } } ); |
|
|
|
t.deepEquals(req, { clean: { layers: ['neighbourhood'] } } ); |
|
|
@ -902,15 +902,12 @@ module.exports.tests.failure_conditions = (test, common) => { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
t.deepEquals(res, expected); |
|
|
|
t.deepEquals(res, expected); |
|
|
|
t.deepEquals(logger.getMessages('info'), [ |
|
|
|
|
|
|
|
'[controller:coarse_reverse][queryType:pip][result_count:1]', |
|
|
|
// logger messages
|
|
|
|
'[controller:coarse_reverse][error]' |
|
|
|
t.true(logger.hasMessages('info'), '[controller:coarse_reverse][error]'); |
|
|
|
]); |
|
|
|
t.true(logger.hasMessages('error'), 'invalid document type, expecting: truthy, got: '); |
|
|
|
t.deepEquals(logger.getMessages('error'), [ |
|
|
|
t.true(logger.hasMessages('info'), '{ neighbourhood: [ { id: 20, name: \'\' } ] }'); |
|
|
|
'{ [PeliasModelError: invalid document type, expecting: truthy, ' + |
|
|
|
|
|
|
|
'got: ]\n name: \'PeliasModelError\',\n message: \'invalid document type, expecting: truthy, got: \' }', |
|
|
|
|
|
|
|
'{ neighbourhood: [ { id: 20, name: \'\' } ] }' |
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
t.end(); |
|
|
|
t.end(); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|