consistant failing test

This commit is contained in:
Patrick Arlt 2015-01-02 07:39:00 -08:00
parent 8285e9dfb5
commit ef0ee1483d
2 changed files with 4 additions and 4 deletions

View File

@ -56,11 +56,11 @@ describe('Popup', function () {
happen.click(c);
// toggle open popup
sinon.spy(marker, "_openPopup");
sinon.spy(marker, "_togglePopup");
marker.fire('click');
expect(marker._openPopup.calledOnce).to.be(true);
expect(marker._togglePopup.calledOnce).to.be(true);
expect(map.hasLayer(marker._popup)).to.be(true);
marker.openPopup.restore();
marker._togglePopup.restore();
// toggle close popup
sinon.spy(marker, "closePopup");

View File

@ -64,7 +64,7 @@ L.Layer.include({
latlng = layer._latlng || layer.getCenter();
} else {
layer = this;
latlng = target
latlng = target;
}
if (this._popup && this._map) {