fix setView test, #1420

This commit is contained in:
Vladimir Agafonkin 2013-02-19 19:25:49 +02:00
parent e3d6dd688f
commit b84b83bf93

View File

@ -36,14 +36,11 @@ describe("Map", function () {
});
describe("#setView", function () {
it("sets the view of the map", function (done) {
it("sets the view of the map", function () {
expect(map.setView([51.505, -0.09], 13)).toBe(map);
expect(map.getZoom()).toBe(13);
window.setTimeout(function() {
expect(map.getCenter().distanceTo([51.505, -0.09])).toBeLessThan(1);
done();
}, 500);
expect(map.getCenter().distanceTo([51.505, -0.09])).toBeLessThan(5);
});
});