Browse Source

fix ciao tests

pull/331/head
Peter Johnson 9 years ago
parent
commit
51858781a9
  1. 4
      test/ciao/autocomplete/focus_point_missing_lat.coffee
  2. 4
      test/ciao/autocomplete/focus_point_missing_lon.coffee
  3. 15
      test/ciao/reverse/boundary_circle_invalid_radius.coffee
  4. 15
      test/ciao/reverse/boundary_circle_valid_radius.coffee
  5. 4
      test/ciao/reverse/point_missing_lat.coffee
  6. 4
      test/ciao/reverse/point_missing_lon.coffee
  7. 2
      test/ciao/reverse/sources_multiple.coffee
  8. 2
      test/ciao/reverse/sources_single.coffee
  9. 6
      test/ciao/search/boundary_circle_invalid_radius.coffee
  10. 4
      test/ciao/search/boundary_circle_missing_lat.coffee
  11. 4
      test/ciao/search/boundary_circle_missing_lon.coffee
  12. 4
      test/ciao/search/boundary_rect_partially_specified.coffee
  13. 4
      test/ciao/search/focus_point_missing_lat.coffee
  14. 4
      test/ciao/search/focus_point_missing_lon.coffee
  15. 6
      test/ciao/search/sources_multiple.coffee
  16. 2
      test/ciao/search/sources_single.coffee

4
test/ciao/autocomplete/focus_point_missing_lat.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors
should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ 'missing point param \'focus.point\' requires all of: \'lat\',\'lon\' to be present' ]
json.geocoding.errors.should.eql [ 'parameters focus.point.lat and focus.point.lon must both be specified' ]
#? expected warnings
should.not.exist json.geocoding.warnings
@ -33,4 +33,4 @@ should.not.exist json.geocoding.warnings
json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10
should.not.exist json.geocoding.query['focus.point.lat']
should.not.exist json.geocoding.query['focus.point.lon']
should.not.exist json.geocoding.query['focus.point.lon']

4
test/ciao/autocomplete/focus_point_missing_lon.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors
should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ 'missing point param \'focus.point\' requires all of: \'lat\',\'lon\' to be present' ]
json.geocoding.errors.should.eql [ 'parameters focus.point.lat and focus.point.lon must both be specified' ]
#? expected warnings
should.not.exist json.geocoding.warnings
@ -33,4 +33,4 @@ should.not.exist json.geocoding.warnings
json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10
should.not.exist json.geocoding.query['focus.point.lat']
should.not.exist json.geocoding.query['focus.point.lon']
should.not.exist json.geocoding.query['focus.point.lon']

15
test/ciao/reverse/boundary_circle_invalid_radius.coffee

@ -27,12 +27,13 @@ should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ 'missing param \'boundary.circle.radius\'' ]
#? expected warnings
should.not.exist json.geocoding.warnings
should.exist json.geocoding.warnings
json.geocoding.warnings.should.eql [ 'boundary.circle is currently unsupported' ]
#? inputs
json.geocoding.query['size'].should.eql 10
json.geocoding.query['point.lat'].should.eql 40.744243
json.geocoding.query['point.lon'].should.eql -73.990342
json.geocoding.query['boundary.circle.lat'].should.eql 40.744243
json.geocoding.query['boundary.circle.lon'].should.eql -73.990342
should.not.exist json.geocoding.query['boundary.circle.radius']
# json.geocoding.query['size'].should.eql 10
# json.geocoding.query['point.lat'].should.eql 40.744243
# json.geocoding.query['point.lon'].should.eql -73.990342
# json.geocoding.query['boundary.circle.lat'].should.eql 40.744243
# json.geocoding.query['boundary.circle.lon'].should.eql -73.990342
# should.not.exist json.geocoding.query['boundary.circle.radius']

15
test/ciao/reverse/boundary_circle_valid_radius.coffee

@ -26,12 +26,13 @@ json.features.should.be.instanceof Array
should.not.exist json.geocoding.errors
#? expected warnings
should.not.exist json.geocoding.warnings
should.exist json.geocoding.warnings
json.geocoding.warnings.should.eql [ 'boundary.circle is currently unsupported' ]
#? inputs
json.geocoding.query['size'].should.eql 10
json.geocoding.query['point.lat'].should.eql 40.744243
json.geocoding.query['point.lon'].should.eql -73.990342
json.geocoding.query['boundary.circle.lat'].should.eql 40.744243
json.geocoding.query['boundary.circle.lon'].should.eql -73.990342
json.geocoding.query['boundary.circle.radius'].should.eql 999.9
# json.geocoding.query['size'].should.eql 10
# json.geocoding.query['point.lat'].should.eql 40.744243
# json.geocoding.query['point.lon'].should.eql -73.990342
# json.geocoding.query['boundary.circle.lat'].should.eql 40.744243
# json.geocoding.query['boundary.circle.lon'].should.eql -73.990342
# json.geocoding.query['boundary.circle.radius'].should.eql 999.9

4
test/ciao/reverse/point_missing_lat.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors
should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ 'missing point param \'point\' requires all of: \'lat\',\'lon\' to be present' ]
json.geocoding.errors.should.eql [ 'parameters point.lat and point.lon must both be specified' ]
#? expected warnings
should.not.exist json.geocoding.warnings
@ -32,4 +32,4 @@ should.not.exist json.geocoding.warnings
#? inputs
json.geocoding.query['size'].should.eql 10
should.not.exist json.geocoding.query['point.lat']
should.not.exist json.geocoding.query['point.lon']
should.not.exist json.geocoding.query['point.lon']

4
test/ciao/reverse/point_missing_lon.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors
should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ 'missing point param \'point\' requires all of: \'lat\',\'lon\' to be present' ]
json.geocoding.errors.should.eql [ 'parameters point.lat and point.lon must both be specified' ]
#? expected warnings
should.not.exist json.geocoding.warnings
@ -32,4 +32,4 @@ should.not.exist json.geocoding.warnings
#? inputs
json.geocoding.query['size'].should.eql 10
should.not.exist json.geocoding.query['point.lat']
should.not.exist json.geocoding.query['point.lon']
should.not.exist json.geocoding.query['point.lon']

2
test/ciao/reverse/sources_multiple.coffee

@ -31,4 +31,4 @@ should.not.exist json.geocoding.warnings
#? inputs
json.geocoding.query['size'].should.eql 10
json.geocoding.query.types['from_sources'].should.eql ["osmaddress","osmnode","osmway","geoname"]
json.geocoding.query['type'].should.eql ["osmaddress","osmnode","osmway","geoname"]
json.geocoding.query['type'].should.eql ["geoname","osmnode","osmway","osmaddress"]

2
test/ciao/reverse/sources_single.coffee

@ -31,4 +31,4 @@ should.not.exist json.geocoding.warnings
#? inputs
json.geocoding.query['size'].should.eql 10
json.geocoding.query.types['from_sources'].should.eql ["osmaddress","osmnode","osmway"]
json.geocoding.query['type'].should.eql ["osmaddress","osmnode","osmway"]
json.geocoding.query['type'].should.eql ["osmnode","osmway","osmaddress"]

6
test/ciao/search/boundary_circle_invalid_radius.coffee

@ -32,6 +32,6 @@ should.not.exist json.geocoding.warnings
#? inputs
json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10
json.geocoding.query['boundary.circle.lat'].should.eql 40.744243
json.geocoding.query['boundary.circle.lon'].should.eql -73.990342
should.not.exist json.geocoding.query['boundary.circle.radius']
should.not.exist json.geocoding.query['boundary.circle.lat']
should.not.exist json.geocoding.query['boundary.circle.lon']
should.not.exist json.geocoding.query['boundary.circle.radius']

4
test/ciao/search/boundary_circle_missing_lat.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors
should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ 'missing circle param \'boundary.circle\' requires all of: \'lat\',\'lon\' to be present' ]
json.geocoding.errors.should.eql [ 'parameters boundary.circle.lat and boundary.circle.lon must both be specified' ]
#? expected warnings
should.not.exist json.geocoding.warnings
@ -32,6 +32,6 @@ should.not.exist json.geocoding.warnings
#? inputs
json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10
json.geocoding.query['boundary.circle.radius'].should.eql 100
should.not.exist json.geocoding.query['boundary.circle.lat']
should.not.exist json.geocoding.query['boundary.circle.lon']
should.not.exist json.geocoding.query['boundary.circle.radius']

4
test/ciao/search/boundary_circle_missing_lon.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors
should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ 'missing circle param \'boundary.circle\' requires all of: \'lat\',\'lon\' to be present' ]
json.geocoding.errors.should.eql [ 'parameters boundary.circle.lat and boundary.circle.lon must both be specified' ]
#? expected warnings
should.not.exist json.geocoding.warnings
@ -32,6 +32,6 @@ should.not.exist json.geocoding.warnings
#? inputs
json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10
json.geocoding.query['boundary.circle.radius'].should.eql 100
should.not.exist json.geocoding.query['boundary.circle.lat']
should.not.exist json.geocoding.query['boundary.circle.lon']
should.not.exist json.geocoding.query['boundary.circle.radius']

4
test/ciao/search/boundary_rect_partially_specified.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors
should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ 'missing rect param \'boundary.rect\' requires all of: \'min_lat\',\'max_lat\',\'min_lon\',\'max_lon\' to be present' ]
json.geocoding.errors.should.eql [ 'parameters boundary.rect.min_lat, boundary.rect.max_lat, boundary.rect.min_lon and boundary.rect.max_lon must all be specified' ]
#? expected warnings
should.not.exist json.geocoding.warnings
@ -35,4 +35,4 @@ json.geocoding.query['size'].should.eql 10
should.not.exist json.geocoding.query['boundary.rect.min_lat']
should.not.exist json.geocoding.query['boundary.rect.max_lat']
should.not.exist json.geocoding.query['boundary.rect.min_lon']
should.not.exist json.geocoding.query['boundary.rect.max_lon']
should.not.exist json.geocoding.query['boundary.rect.max_lon']

4
test/ciao/search/focus_point_missing_lat.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors
should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ 'missing point param \'focus.point\' requires all of: \'lat\',\'lon\' to be present' ]
json.geocoding.errors.should.eql [ 'parameters focus.point.lat and focus.point.lon must both be specified' ]
#? expected warnings
should.not.exist json.geocoding.warnings
@ -33,4 +33,4 @@ should.not.exist json.geocoding.warnings
json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10
should.not.exist json.geocoding.query['focus.point.lat']
should.not.exist json.geocoding.query['focus.point.lon']
should.not.exist json.geocoding.query['focus.point.lon']

4
test/ciao/search/focus_point_missing_lon.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors
should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ 'missing point param \'focus.point\' requires all of: \'lat\',\'lon\' to be present' ]
json.geocoding.errors.should.eql [ 'parameters focus.point.lat and focus.point.lon must both be specified' ]
#? expected warnings
should.not.exist json.geocoding.warnings
@ -33,4 +33,4 @@ should.not.exist json.geocoding.warnings
json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10
should.not.exist json.geocoding.query['focus.point.lat']
should.not.exist json.geocoding.query['focus.point.lon']
should.not.exist json.geocoding.query['focus.point.lon']

6
test/ciao/search/sources_multiple.coffee

@ -1,10 +1,10 @@
#> sources filter
path: '/v1/search?text=a&sources=openstreetmap,geonames'
path: "/v1/search?text=a&sources=openstreetmap,geonames"
#? 200 ok
response.statusCode.should.be.equal 200
response.should.have.header 'charset', 'utf8'
response.should.have.header "charset", 'utf8'
response.should.have.header 'content-type', 'application/json; charset=utf-8'
#? valid geocoding block
@ -32,4 +32,4 @@ should.not.exist json.geocoding.warnings
json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10
json.geocoding.query.types['from_sources'].should.eql ["osmaddress","osmnode","osmway","geoname"]
json.geocoding.query['type'].should.eql ["osmaddress","osmnode","osmway","geoname"]
json.geocoding.query['type'].should.eql ["geoname","osmnode","osmway","osmaddress"]

2
test/ciao/search/sources_single.coffee

@ -32,4 +32,4 @@ should.not.exist json.geocoding.warnings
json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10
json.geocoding.query.types['from_sources'].should.eql ["osmaddress","osmnode","osmway"]
json.geocoding.query['type'].should.eql ["osmaddress","osmnode","osmway"]
json.geocoding.query['type'].should.eql ["osmnode","osmway","osmaddress"]

Loading…
Cancel
Save