Remove deprecate tags test

This commit is contained in:
Tom MacWright
2013-02-07 17:10:31 -05:00
parent 5e328435e6
commit 3626534a70
2 changed files with 0 additions and 48 deletions
-1
View File
@@ -91,7 +91,6 @@
<script src='../js/id/actions/move_way.js'></script>
<script src='../js/id/actions/noop.js'></script>
<script src='../js/id/actions/reverse.js'></script>
<script src='../js/id/actions/deprecate_tags.js'></script>
<script src='../js/id/actions/split.js'></script>
<script src='../js/id/behavior.js'></script>
-47
View File
@@ -1,47 +0,0 @@
describe('iD.actions.DeprecateTags', function () {
it('deprecates tags', function () {
var entity = iD.Entity({ tags: { barrier: 'wire_fence' } }),
graph = iD.actions.DeprecateTags(entity.id)(iD.Graph([entity])),
undeprecated = {
barrier: 'fence',
fence_type: 'chain'
};
expect(graph.entity(entity.id).tags).to.eql(undeprecated);
});
it('does not overwrite explicit tags', function () {
var entity = iD.Entity({ tags: { barrier: 'wire_fence', fence_type: 'foo' } }),
graph = iD.actions.DeprecateTags(entity.id)(iD.Graph([entity])),
undeprecated = {
barrier: 'fence',
fence_type: 'foo'
};
expect(graph.entity(entity.id).tags).to.eql(undeprecated);
});
it('leaves other tags alone', function () {
var entity = iD.Entity({ tags: { highway: 'ford', name: 'Foo' } }),
graph = iD.actions.DeprecateTags(entity.id)(iD.Graph([entity])),
undeprecated = {
ford: 'yes',
name: 'Foo'
};
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])),
undeprecated = {
'generator:output': '1 billion volts'
};
expect(graph.entity(entity.id).tags).to.eql(undeprecated);
});
});