From f94b683ef30751a3c5e4d3c0e83dc0c29cd71c3a Mon Sep 17 00:00:00 2001 From: Stephen Hess Date: Thu, 8 Jun 2017 17:37:05 -0400 Subject: [PATCH] moved 'parser' placeholder url part to service config --- service/configurations/PlaceHolder.js | 2 +- test/unit/service/configurations/PlaceHolder.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/service/configurations/PlaceHolder.js b/service/configurations/PlaceHolder.js index 9102184d..8d27c4c0 100644 --- a/service/configurations/PlaceHolder.js +++ b/service/configurations/PlaceHolder.js @@ -24,7 +24,7 @@ class PlaceHolder extends ServiceConfiguration { } getUrl(req) { - return url.resolve(this.baseUrl, 'search'); + return url.resolve(this.baseUrl, 'parser/search'); } } diff --git a/test/unit/service/configurations/PlaceHolder.js b/test/unit/service/configurations/PlaceHolder.js index e08ef091..02cedfa7 100644 --- a/test/unit/service/configurations/PlaceHolder.js +++ b/test/unit/service/configurations/PlaceHolder.js @@ -29,7 +29,7 @@ module.exports.tests.all = (test, common) => { const placeholder = new PlaceHolder(configBlob); - t.equals(placeholder.getUrl(), 'http://localhost:1234/search'); + t.equals(placeholder.getUrl(), 'http://localhost:1234/parser/search'); t.end(); }); @@ -114,14 +114,14 @@ module.exports.tests.all = (test, common) => { test('baseUrl ending in / should not have double /\'s return by getUrl', (t) => { const configBlob = { - url: 'http://localhost:1234/blah', + url: 'http://localhost:1234/', timeout: 17, retries: 19 }; const placeholder = new PlaceHolder(configBlob); - t.deepEquals(placeholder.getUrl(), 'http://localhost:1234/blah/search'); + t.deepEquals(placeholder.getUrl(), 'http://localhost:1234/parser/search'); t.end(); });