Files
iD/test/spec/actions/change_member.js
Bryan Housel 71b2d2c6b7 Upgrade legacy symbols in tests
- iD.Context -> iD.coreContext
- iD.Graph -> iD.coreGraph
- iD.Node -> iD.osmNode
- iD.Way -> iD.osmWay
- iD.Relation -> iD.osmRelation
2019-01-30 15:43:02 -05:00

10 lines
473 B
JavaScript

describe('iD.actionChangeMember', function () {
it('updates the member at the specified index', function () {
var node = iD.osmNode(),
relation = iD.osmRelation({members: [{id: node.id}]}),
action = iD.actionChangeMember(relation.id, {id: node.id, role: 'node'}, 0),
graph = action(iD.coreGraph([node, relation]));
expect(graph.entity(relation.id).members).to.eql([{id: node.id, role: 'node'}]);
});
});