Browse Source

Update ciao tests for /v1

pull/214/head
Julian Simioni 9 years ago
parent
commit
63d0447b25
  1. 2
      test/ciao/index.coffee
  2. 2
      test/ciao/place/msuccess.coffee
  3. 2
      test/ciao/place/success.coffee
  4. 4
      test/ciao/reverse/success.coffee
  5. 4
      test/ciao/search/success.coffee
  6. 4
      test/ciao/suggest/nearby_nobias.coffee
  7. 4
      test/ciao/suggest/success.coffee
  8. 4
      test/ciao/suggest/success_nearby.coffee

2
test/ciao/index.coffee

@ -1,6 +1,6 @@
#> api root
path: '/'
path: '/v1/'
#? endpoint available
response.statusCode.should.equal 200

2
test/ciao/place/msuccess.coffee

@ -1,6 +1,6 @@
#> valid place query
path: '/place?id=geoname:4221195&id=geoname:4193595'
path: '/v1/place?id=geoname:4221195&id=geoname:4193595'
#? 200 ok
response.statusCode.should.equal 200

2
test/ciao/place/success.coffee

@ -1,6 +1,6 @@
#> valid place query
path: '/place?id=geoname:4221195'
path: '/v1/place?id=geoname:4221195'
#? 200 ok
response.statusCode.should.equal 200

4
test/ciao/reverse/success.coffee

@ -1,5 +1,5 @@
#> valid reverse query
path: '/reverse?lat=29.49136&lon=-82.50622'
path: '/v1/reverse?lat=29.49136&lon=-82.50622'
#? 200 ok
response.statusCode.should.equal 200
@ -12,4 +12,4 @@ json.date.should.be.within now-5000, now+5000
#? valid geojson
json.type.should.equal 'FeatureCollection'
json.features.should.be.instanceof Array
json.features.should.be.instanceof Array

4
test/ciao/search/success.coffee

@ -1,5 +1,5 @@
#> valid search query
path: '/search?input=lake&lat=29.49136&lon=-82.50622'
path: '/v1/search?input=lake&lat=29.49136&lon=-82.50622'
#? 200 ok
response.statusCode.should.equal 200
@ -12,4 +12,4 @@ json.date.should.be.within now-5000, now+5000
#? valid geojson
json.type.should.equal 'FeatureCollection'
json.features.should.be.instanceof Array
json.features.should.be.instanceof Array

4
test/ciao/suggest/nearby_nobias.coffee

@ -1,6 +1,6 @@
#> suggest without geo bias
path: '/suggest/nearby?input=a'
path: '/v1/suggest/nearby?input=a'
#? 400 bad request
response.statusCode.should.equal 400
response.statusCode.should.equal 400

4
test/ciao/suggest/success.coffee

@ -1,6 +1,6 @@
#> valid suggest query
path: '/suggest?input=a&lat=0&lon=0'
path: '/v1/suggest?input=a&lat=0&lon=0'
#? 200 ok
response.statusCode.should.equal 200
@ -13,4 +13,4 @@ json.date.should.be.within now-5000, now+5000
#? valid geojson
json.type.should.equal 'FeatureCollection'
json.features.should.be.instanceof Array
json.features.should.be.instanceof Array

4
test/ciao/suggest/success_nearby.coffee

@ -1,6 +1,6 @@
#> valid suggest query
path: '/suggest/nearby?input=a&lat=29.49136&lon=-82.50622'
path: '/v1/suggest/nearby?input=a&lat=29.49136&lon=-82.50622'
#? 200 ok
response.statusCode.should.equal 200
@ -13,4 +13,4 @@ json.date.should.be.within now-5000, now+5000
#? valid geojson
json.type.should.equal 'FeatureCollection'
json.features.should.be.instanceof Array
json.features.should.be.instanceof Array

Loading…
Cancel
Save