X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/4fee4c001f2133fc9856f7aeed29dcf51f5d685d..12aedd34356154342b841eefc123c385014c872c:/test/javascripts/osm_test.js diff --git a/test/javascripts/osm_test.js b/test/javascripts/osm_test.js index 5ab92adf7..10d562959 100644 --- a/test/javascripts/osm_test.js +++ b/test/javascripts/osm_test.js @@ -220,14 +220,15 @@ describe("OSM", function () { describe(".locationCookie", function () { it("creates a location cookie value", function () { - $("body").html($("
")); + $("body").append("
"); const map = new L.OSM.Map("map", { center: [57.6247, -3.6845], zoom: 9 }); map.updateLayers(""); expect(OSM.locationCookie(map)).to.eq("-3.685|57.625|9|M"); + $("#map").remove(); }); it("respects zoomPrecision", function () { - $("body").html($("
")); + $("body").append("
"); const map = new L.OSM.Map("map", { center: [57.6247, -3.6845], zoom: 9 }); map.updateLayers(""); expect(OSM.locationCookie(map)).to.eq("-3.685|57.625|9|M"); @@ -235,6 +236,7 @@ describe("OSM", function () { // using map._zoom here to update the zoom level manually map._zoom = 5; expect(OSM.locationCookie(map)).to.eq("-3.68|57.62|5|M"); + $("#map").remove(); }); });