Mock call to nominatim for cucumber

This commit is contained in:
Benjamin Neff 2017-09-16 20:45:08 +02:00
parent bd99127600
commit 5ebbacf444
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 8 additions and 2 deletions

View file

@ -9,5 +9,11 @@ When /^I allow geolocation$/ do
} }
} }
}; };
$.getJSON = function(url, myCallback) {
if (url === "https://nominatim.openstreetmap.org/reverse?format=json&lat=42.42424242&lon=3.14159&addressdetails=3") {
return myCallback({display_name: "locator address"});
}
};
JS JS
end end