Files
iD/test/spec/actions/remove_way_node.js
John Firebaugh 9743ee282b More mode and action overhaul
Pass entities to actions via id; this allows safe composition
of actions that modify the same entity.

Fix remaining ghost node cases (#213).

Create more logical undo states when drawing.
2012-12-06 18:39:51 -05:00

9 lines
355 B
JavaScript

describe("iD.actions.RemoveWayNode", function () {
it("removes a node from a way", function () {
var node = iD.Node({id: "n1"}),
way = iD.Way({id: "w1", nodes: ["n1"]}),
graph = iD.actions.RemoveWayNode(way.id, node.id)(iD.Graph({n1: node, w1: way}));
expect(graph.entity(way.id).nodes).to.eql([]);
});
});