mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-30 03:39:36 +02:00
Use summary to calculate # in Save button
This commit is contained in:
@@ -211,22 +211,6 @@ describe("iD.History", function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe("#numChanges", function() {
|
||||
it("is 0 when there are no changes", function() {
|
||||
expect(history.numChanges()).to.eql(0);
|
||||
});
|
||||
|
||||
it("is the sum of all types of changes", function() {
|
||||
var node1 = iD.Node({id: "n1"}),
|
||||
node2 = iD.Node();
|
||||
history.merge({ n1: node1 });
|
||||
history.perform(function (graph) { return graph.remove(node1); });
|
||||
expect(history.numChanges()).to.eql(1);
|
||||
history.perform(function (graph) { return graph.replace(node2); });
|
||||
expect(history.numChanges()).to.eql(2);
|
||||
});
|
||||
});
|
||||
|
||||
describe("#reset", function () {
|
||||
it("clears the version stack", function () {
|
||||
history.perform(action, "annotation");
|
||||
|
||||
Reference in New Issue
Block a user