Wipe out some tags entirely, refs #585

This commit is contained in:
Tom MacWright
2013-02-04 17:20:06 -05:00
parent dbb4615918
commit 3e71dd56cd
3 changed files with 19 additions and 4 deletions
+7
View File
@@ -29,6 +29,13 @@ describe('iD.actions.DeprecateTags', function () {
expect(graph.entity(entity.id).tags).to.eql(undeprecated);
});
it('wipes out tags that should be entirely removed', function () {
var entity = iD.Entity({ tags: { 'tiger:source': 'foo' } }),
graph = iD.actions.DeprecateTags(entity.id)(iD.Graph([entity])),
undeprecated = { };
expect(graph.entity(entity.id).tags).to.eql(undeprecated);
});
it('replaces keys', function () {
var entity = iD.Entity({ tags: { power_rating: '1 billion volts' } }),
graph = iD.actions.DeprecateTags(entity.id)(iD.Graph([entity])),