mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
INSA: adapt tests to 1.16 protocol, add to test/index.js
This commit is contained in:
parent
094e95c9cc
commit
f6c615531b
2 changed files with 7 additions and 6 deletions
|
@ -3,4 +3,5 @@
|
|||
require('./db')
|
||||
require('./vbb')
|
||||
require('./oebb')
|
||||
require('./insa')
|
||||
require('./throttle')
|
||||
|
|
12
test/insa.js
12
test/insa.js
|
@ -122,9 +122,9 @@ test('Magdeburg Hbf to 39104 Magdeburg, Sternstr. 10', co(function*(t) {
|
|||
const magdeburgHbf = '8010224'
|
||||
const sternStr = {
|
||||
type: 'location',
|
||||
latitude: 52.118745,
|
||||
longitude: 11.627117,
|
||||
address: '39104 Magdeburg, Sternstr. 10'
|
||||
latitude: 52.118414,
|
||||
longitude: 11.422332,
|
||||
address: 'Magdeburg - Altenstadt, Sternstraße 10'
|
||||
}
|
||||
|
||||
const journeys = yield client.journeys(magdeburgHbf, sternStr, {
|
||||
|
@ -148,9 +148,9 @@ test('Magdeburg Hbf to 39104 Magdeburg, Sternstr. 10', co(function*(t) {
|
|||
|
||||
const d = lastLeg.destination
|
||||
assertValidAddress(t, d)
|
||||
t.equal(d.address, '39104 Magdeburg, Sternstr. 10')
|
||||
t.ok(isRoughlyEqual(0.0001, d.latitude, 52.118745))
|
||||
t.ok(isRoughlyEqual(0.0001, d.longitude, 11.627117))
|
||||
t.equal(d.address, 'Magdeburg - Altenstadt, Sternstraße 10')
|
||||
t.ok(isRoughlyEqual(0.0001, d.latitude, 52.118414))
|
||||
t.ok(isRoughlyEqual(0.0001, d.longitude, 11.422332))
|
||||
|
||||
t.end()
|
||||
}))
|
||||
|
|
Loading…
Add table
Reference in a new issue