Rename removeMember -> removeMembersWithID

This commit is contained in:
John Firebaugh
2013-05-16 14:06:10 -07:00
parent 4e5c18c0ac
commit affdc987e4
6 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ describe('iD.Graph', function() {
it("avoids re-adding a modified relation as a parent relation", function() {
var n = iD.Node({id: 'n'}),
r1 = iD.Relation({id: 'r1', members: [{id: 'n'}]}),
r2 = r1.removeMember('n'),
r2 = r1.removeMembersWithID('n'),
graph = iD.Graph([n, r1]),
graph2 = graph.replace(r2);
+4 -4
View File
@@ -128,10 +128,10 @@ describe('iD.Relation', function () {
});
});
describe("#removeMember", function () {
it("removes a member", function () {
var r = iD.Relation({members: [{id: 'a'}]});
expect(r.removeMember('a').members).to.eql([]);
describe("#removeMembersWithID", function () {
it("removes members with the given ID", function () {
var r = iD.Relation({members: [{id: 'a'}, {id: 'b'}, {id: 'a'}]});
expect(r.removeMembersWithID('a').members).to.eql([{id: 'b'}]);
});
});