@@ -59,20 +59,36 @@ def test_georadiusbymember_with_options_count_sort
59
59
assert_equal [ [ "Palermo" , "166.2742" ] ] , city
60
60
end
61
61
62
+ def coordinates_catania
63
+ if version >= "8.0"
64
+ [ "15.087267458438873" , "37.50266842333162" ]
65
+ else
66
+ [ "15.08726745843887329" , "37.50266842333162032" ]
67
+ end
68
+ end
69
+
70
+ def coordinates_palermo
71
+ if version >= "8.0"
72
+ [ "13.361389338970184" , "38.1155563954963" ]
73
+ else
74
+ [ "13.36138933897018433" , "38.11555639549629859" ]
75
+ end
76
+ end
77
+
62
78
def test_geopos
63
79
location = r . geopos ( "Sicily" , "Catania" )
64
- assert_equal [ [ "15.08726745843887329" , "37.50266842333162032" ] ] , location
80
+ assert_equal [ coordinates_catania ] , location
65
81
66
82
locations = r . geopos ( "Sicily" , [ "Palermo" , "Catania" ] )
67
- assert_equal [ [ "13.36138933897018433" , "38.11555639549629859" ] , [ "15.08726745843887329" , "37.50266842333162032" ] ] , locations
83
+ assert_equal [ coordinates_palermo , coordinates_catania ] , locations
68
84
end
69
85
70
86
def test_geopos_nonexistant_location
71
87
location = r . geopos ( "Sicily" , "Rome" )
72
88
assert_equal [ nil ] , location
73
89
74
90
locations = r . geopos ( "Sicily" , [ "Rome" , "Catania" ] )
75
- assert_equal [ nil , [ "15.08726745843887329" , "37.50266842333162032" ] ] , locations
91
+ assert_equal [ nil , coordinates_catania ] , locations
76
92
end
77
93
78
94
def test_geodist
0 commit comments