adapt tests to 0a0cddc

This commit is contained in:
Jannis R 2018-07-19 21:55:54 +02:00 committed by Jannis Redmann
parent f20931b6de
commit 5f39d2875c
7 changed files with 8 additions and 7 deletions

View file

@ -66,7 +66,7 @@ const assertValidPrice = (t, p) => {
} }
const test = tapePromise(tape) const test = tapePromise(tape)
const client = createClient(dbProfile) const client = createClient(dbProfile, 'public-transport/hafas-client:test')
const berlinHbf = '8011160' const berlinHbf = '8011160'
const münchenHbf = '8000261' const münchenHbf = '8000261'

View file

@ -33,7 +33,7 @@ const cfg = {
const validate = createValidate(cfg, {}) const validate = createValidate(cfg, {})
const test = tapePromise(tape) const test = tapePromise(tape)
const client = createClient(insaProfile) const client = createClient(insaProfile, 'public-transport/hafas-client:test')
const magdeburgHbf = '8010224' const magdeburgHbf = '8010224'
const magdeburgBuckau = '8013456' const magdeburgBuckau = '8013456'

View file

@ -59,7 +59,7 @@ const assertValidPrice = (t, p) => {
} }
const test = tapePromise(tape) const test = tapePromise(tape)
const client = createClient(nahshProfile) const client = createClient(nahshProfile, 'public-transport/hafas-client:test')
const kielHbf = '9049079' const kielHbf = '9049079'
const flensburg = '9027253' const flensburg = '9027253'

View file

@ -50,7 +50,7 @@ const assertValidPrice = (t, p) => {
} }
const test = tapePromise(tape) const test = tapePromise(tape)
const client = createClient(oebbProfile) const client = createClient(oebbProfile, 'public-transport/hafas-client:test')
const salzburgHbf = '8100002' const salzburgHbf = '8100002'
const wienFickeystr = '911014' const wienFickeystr = '911014'

View file

@ -5,6 +5,7 @@ const test = require('tape')
const createThrottledClient = require('../throttle') const createThrottledClient = require('../throttle')
const vbbProfile = require('../p/vbb') const vbbProfile = require('../p/vbb')
const userAgent = 'public-transport/hafas-client:test'
const spichernstr = '900000042101' const spichernstr = '900000042101'
test('throttle works', (t) => { test('throttle works', (t) => {
@ -15,7 +16,7 @@ test('throttle works', (t) => {
} }
const mockProfile = Object.assign({}, vbbProfile, {transformReqBody}) const mockProfile = Object.assign({}, vbbProfile, {transformReqBody})
const client = createThrottledClient(mockProfile, 2, 1000) const client = createThrottledClient(mockProfile, userAgent, 2, 1000)
for (let i = 0; i < 10; i++) client.departures(spichernstr, {duration: 1}) for (let i = 0; i < 10; i++) client.departures(spichernstr, {duration: 1})
t.plan(3) t.plan(3)

View file

@ -103,7 +103,7 @@ const validate = createValidate(cfg, {
}) })
const test = tapePromise(tape) const test = tapePromise(tape)
const client = createClient(vbbProfile) const client = createClient(vbbProfile, 'public-transport/hafas-client:test')
const amrumerStr = '900000009101' const amrumerStr = '900000009101'
const spichernstr = '900000042101' const spichernstr = '900000042101'

View file

@ -30,7 +30,7 @@ const cfg = {
const validate = createValidate(cfg, {}) const validate = createValidate(cfg, {})
const test = tapePromise(tape) const test = tapePromise(tape)
const client = createClient(vbnProfile) const client = createClient(vbnProfile, 'public-transport/hafas-client:test')
const bremenHbf = '8000050' const bremenHbf = '8000050'
const bremerhavenHbf = '8000051' const bremerhavenHbf = '8000051'