2012-10-15 16:39:07 +08:00
|
|
|
describe('Circle', function () {
|
|
|
|
describe('#getBounds', function () {
|
|
|
|
|
2014-01-03 06:37:34 +08:00
|
|
|
var map, circle;
|
2012-10-15 16:39:07 +08:00
|
|
|
|
|
|
|
beforeEach(function () {
|
2014-01-03 06:37:34 +08:00
|
|
|
map = L.map(document.createElement('div')).setView([0, 0], 4);
|
|
|
|
circle = L.circle([50, 30], 200).addTo(map);
|
2012-10-15 16:39:07 +08:00
|
|
|
});
|
|
|
|
|
2013-02-20 04:41:48 +08:00
|
|
|
it('returns bounds', function () {
|
2012-10-15 16:39:07 +08:00
|
|
|
var bounds = circle.getBounds();
|
|
|
|
|
2014-01-03 06:37:34 +08:00
|
|
|
expect(bounds.getSouthWest()).nearLatLng(new L.LatLng(49.95122, 29.88281));
|
|
|
|
expect(bounds.getNorthEast()).nearLatLng(new L.LatLng(50.06419, 30.05859));
|
2012-10-15 16:39:07 +08:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|