mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 17:14:04 +02:00
Restore map update event (fixes #167)
This commit is contained in:
@@ -61,6 +61,30 @@ describe('Map', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("update", function () {
|
||||
var spy;
|
||||
|
||||
beforeEach(function () {
|
||||
spy = sinon.spy();
|
||||
map.on('update', spy);
|
||||
});
|
||||
|
||||
it("is emitted when performing an action", function () {
|
||||
map.perform(iD.actions.noop);
|
||||
expect(spy).to.have.been.called;
|
||||
});
|
||||
|
||||
it("is emitted when undoing an action", function () {
|
||||
map.undo();
|
||||
expect(spy).to.have.been.called;
|
||||
});
|
||||
|
||||
it("is emitted when redoing an action", function () {
|
||||
map.redo();
|
||||
expect(spy).to.have.been.called;
|
||||
});
|
||||
});
|
||||
|
||||
describe("surface", function() {
|
||||
it("is an SVG element", function() {
|
||||
expect(map.surface.node().tagName).to.equal("svg");
|
||||
|
||||
Reference in New Issue
Block a user