From ab006054f86ca34dffd4cdd2aceb55293d81836a Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Thu, 1 Oct 2015 15:49:58 -0400 Subject: [PATCH] Fix low hanging fruit in ciao tests Quite a few of our tests simply had old error messages as expectations, or expected output in an array that was correct but in the wrong order. Those are all fixed. --- test/ciao/autocomplete/focus_point_missing_lat.coffee | 4 ++-- test/ciao/autocomplete/focus_point_missing_lon.coffee | 4 ++-- test/ciao/reverse/point_missing_lat.coffee | 4 ++-- test/ciao/reverse/point_missing_lon.coffee | 4 ++-- test/ciao/reverse/sources_multiple.coffee | 2 +- test/ciao/reverse/sources_single.coffee | 2 +- test/ciao/search/boundary_circle_missing_lat.coffee | 4 ++-- test/ciao/search/boundary_circle_missing_lon.coffee | 4 ++-- test/ciao/search/boundary_rect_partially_specified.coffee | 4 ++-- test/ciao/search/focus_point_missing_lat.coffee | 4 ++-- test/ciao/search/focus_point_missing_lon.coffee | 4 ++-- test/ciao/search/sources_multiple.coffee | 2 +- test/ciao/search/sources_single.coffee | 2 +- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/test/ciao/autocomplete/focus_point_missing_lat.coffee b/test/ciao/autocomplete/focus_point_missing_lat.coffee index a3da2f8a..300a3bd5 100644 --- a/test/ciao/autocomplete/focus_point_missing_lat.coffee +++ b/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'] \ No newline at end of file +should.not.exist json.geocoding.query['focus.point.lon'] diff --git a/test/ciao/autocomplete/focus_point_missing_lon.coffee b/test/ciao/autocomplete/focus_point_missing_lon.coffee index 8c9a8f48..fc1e507b 100644 --- a/test/ciao/autocomplete/focus_point_missing_lon.coffee +++ b/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'] \ No newline at end of file +should.not.exist json.geocoding.query['focus.point.lon'] diff --git a/test/ciao/reverse/point_missing_lat.coffee b/test/ciao/reverse/point_missing_lat.coffee index 649a5db6..7cd2f44a 100644 --- a/test/ciao/reverse/point_missing_lat.coffee +++ b/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'] \ No newline at end of file +should.not.exist json.geocoding.query['point.lon'] diff --git a/test/ciao/reverse/point_missing_lon.coffee b/test/ciao/reverse/point_missing_lon.coffee index e28f2a1b..a206726a 100644 --- a/test/ciao/reverse/point_missing_lon.coffee +++ b/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'] \ No newline at end of file +should.not.exist json.geocoding.query['point.lon'] diff --git a/test/ciao/reverse/sources_multiple.coffee b/test/ciao/reverse/sources_multiple.coffee index 9de6389f..8728109c 100644 --- a/test/ciao/reverse/sources_multiple.coffee +++ b/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"] \ No newline at end of file +json.geocoding.query['type'].should.eql ["geoname","osmnode","osmway","osmaddress"] diff --git a/test/ciao/reverse/sources_single.coffee b/test/ciao/reverse/sources_single.coffee index ad4628f4..2c638503 100644 --- a/test/ciao/reverse/sources_single.coffee +++ b/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"] \ No newline at end of file +json.geocoding.query['type'].should.eql ["osmnode","osmway","osmaddress"] diff --git a/test/ciao/search/boundary_circle_missing_lat.coffee b/test/ciao/search/boundary_circle_missing_lat.coffee index ccc7dcc0..74adb916 100644 --- a/test/ciao/search/boundary_circle_missing_lat.coffee +++ b/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 @@ -34,4 +34,4 @@ json.geocoding.query['text'].should.eql 'a' json.geocoding.query['size'].should.eql 10 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'] \ No newline at end of file +should.not.exist json.geocoding.query['boundary.circle.radius'] diff --git a/test/ciao/search/boundary_circle_missing_lon.coffee b/test/ciao/search/boundary_circle_missing_lon.coffee index 63a1d794..9e7e314d 100644 --- a/test/ciao/search/boundary_circle_missing_lon.coffee +++ b/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 @@ -34,4 +34,4 @@ json.geocoding.query['text'].should.eql 'a' json.geocoding.query['size'].should.eql 10 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'] \ No newline at end of file +should.not.exist json.geocoding.query['boundary.circle.radius'] diff --git a/test/ciao/search/boundary_rect_partially_specified.coffee b/test/ciao/search/boundary_rect_partially_specified.coffee index c00e77bc..0c0e72e1 100644 --- a/test/ciao/search/boundary_rect_partially_specified.coffee +++ b/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'] \ No newline at end of file +should.not.exist json.geocoding.query['boundary.rect.max_lon'] diff --git a/test/ciao/search/focus_point_missing_lat.coffee b/test/ciao/search/focus_point_missing_lat.coffee index 0a730f41..6e534133 100644 --- a/test/ciao/search/focus_point_missing_lat.coffee +++ b/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'] \ No newline at end of file +should.not.exist json.geocoding.query['focus.point.lon'] diff --git a/test/ciao/search/focus_point_missing_lon.coffee b/test/ciao/search/focus_point_missing_lon.coffee index e712764c..cf81b267 100644 --- a/test/ciao/search/focus_point_missing_lon.coffee +++ b/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'] \ No newline at end of file +should.not.exist json.geocoding.query['focus.point.lon'] diff --git a/test/ciao/search/sources_multiple.coffee b/test/ciao/search/sources_multiple.coffee index fa32183f..a376e5a7 100644 --- a/test/ciao/search/sources_multiple.coffee +++ b/test/ciao/search/sources_multiple.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","geoname"] -json.geocoding.query['type'].should.eql ["osmaddress","osmnode","osmway","geoname"] \ No newline at end of file +json.geocoding.query['type'].should.eql ["geoname","osmnode","osmway","osmaddress"] diff --git a/test/ciao/search/sources_single.coffee b/test/ciao/search/sources_single.coffee index a32ad0a7..3b3e0bf4 100644 --- a/test/ciao/search/sources_single.coffee +++ b/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"] \ No newline at end of file +json.geocoding.query['type'].should.eql ["osmnode","osmway","osmaddress"]