Add cucumber tests for node IDs

This commit is contained in:
Lauren Budorick
2016-05-19 11:04:00 -04:00
committed by Daniel J. Hofmann
parent a4ac07866a
commit 6777127497
3 changed files with 22 additions and 1 deletions
+11 -1
View File
@@ -34,7 +34,8 @@ module.exports = function () {
turns = '',
route = '',
duration = '',
annotation = '';
annotation = '',
OSMIDs = '';
if (res.statusCode === 200) {
@@ -61,6 +62,11 @@ module.exports = function () {
if (json.matchings.length != 1) throw new Error('*** Checking annotation only supported for matchings with one subtrace');
annotation = this.annotationList(json.matchings[0]);
}
if (headers.has('OSM IDs')) {
if (json.matchings.length != 1) throw new Error('*** CHecking annotation only supported for matchings with one subtrace');
OSMIDs = this.OSMIDList(json.matchings[0]);
}
}
if (headers.has('turns')) {
@@ -79,6 +85,10 @@ module.exports = function () {
got.annotation = annotation.toString();
}
if (headers.has('OSM IDs')) {
got['OSM IDs'] = OSMIDs;
}
var ok = true;
var encodedResult = '',
extendedTarget = '';