Ensure that boundary relation members look like boundaries

This commit is contained in:
John Firebaugh
2016-01-30 13:01:01 -08:00
parent 3f5d7ec701
commit 087d5aa65f
3 changed files with 25 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
describe("iD.svg.RelationMemberTags", function() {
it("includes tags from parent multipolygon relations", function() {
var graph = iD.Graph([
iD.Way({id: 'w'}),
iD.Relation({id: 'r', members: [{id: 'w'}], tags: {type: 'multipolygon'}}),
]);
expect(iD.svg.RelationMemberTags(graph)(graph.entity('w')))
.to.eql({type: 'multipolygon'});
});
it("includes tags from parent boundary relations", function() {
var graph = iD.Graph([
iD.Way({id: 'w'}),
iD.Relation({id: 'r', members: [{id: 'w'}], tags: {type: 'boundary'}}),
]);
expect(iD.svg.RelationMemberTags(graph)(graph.entity('w')))
.to.eql({type: 'boundary'});
});
});