mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 17:52:55 +00:00
10 lines
463 B
JavaScript
10 lines
463 B
JavaScript
describe('iD.actionChangeMember', function () {
|
|
it('updates the member at the specified index', function () {
|
|
var node = iD.Node(),
|
|
relation = iD.Relation({members: [{id: node.id}]}),
|
|
action = iD.actionChangeMember(relation.id, {id: node.id, role: 'node'}, 0),
|
|
graph = action(iD.Graph([node, relation]));
|
|
expect(graph.entity(relation.id).members).to.eql([{id: node.id, role: 'node'}]);
|
|
});
|
|
});
|