From ef0ee1483dd5e8a1d30b4027b424e86093eb74af Mon Sep 17 00:00:00 2001 From: Patrick Arlt Date: Fri, 2 Jan 2015 07:39:00 -0800 Subject: [PATCH] consistant failing test --- spec/suites/layer/PopupSpec.js | 6 +++--- src/layer/Layer.Popup.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/suites/layer/PopupSpec.js b/spec/suites/layer/PopupSpec.js index 36244754..07eb86ca 100644 --- a/spec/suites/layer/PopupSpec.js +++ b/spec/suites/layer/PopupSpec.js @@ -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"); diff --git a/src/layer/Layer.Popup.js b/src/layer/Layer.Popup.js index 62e2869d..f464e8ad 100644 --- a/src/layer/Layer.Popup.js +++ b/src/layer/Layer.Popup.js @@ -64,7 +64,7 @@ L.Layer.include({ latlng = layer._latlng || layer.getCenter(); } else { layer = this; - latlng = target + latlng = target; } if (this._popup && this._map) {