mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 22:46:38 +02:00
iD.actions.Revert (see #537)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
describe('iD.actions.Revert', function() {
|
||||
it('reverts an entity', function() {
|
||||
var n1 = iD.Node({id: 'n' }),
|
||||
n2 = n1.update({}),
|
||||
graph = iD.Graph([n1]).replace(n2);
|
||||
|
||||
expect(graph.entity('n')).to.equal(n2);
|
||||
graph = iD.actions.Revert(n2)(graph)
|
||||
expect(graph.entity('n')).to.equal(n1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user