Browse Source

moved 'parser' placeholder url part to service config

pull/907/head
Stephen Hess 8 years ago
parent
commit
f94b683ef3
  1. 2
      service/configurations/PlaceHolder.js
  2. 6
      test/unit/service/configurations/PlaceHolder.js

2
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');
}
}

6
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();
});

Loading…
Cancel
Save