Skip to content

Commit

Permalink
Test case for relation 26758
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnonthgol committed Jul 15, 2012
1 parent 8160dec commit 5e5b1c0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test_relation.rb
Expand Up @@ -210,6 +210,17 @@ def test_sorting_multipolyon_members
actions = bot.action_for(history)
assert_equal([], actions)
end

# Order should be important when the relation may not be a multipolygon
def test_sorting_multipolyon_retag
history = [OSM::Relation[[ [OSM::Way,1], [OSM::Way,2] ], :id=>1, :changeset=>1, :version=>1, "type" => "multipolygon"],
OSM::Relation[[ [OSM::Way,2], [OSM::Way,1] ], :id=>1, :changeset=>3, :version=>2, "type" => "route"]]
bot = ChangeBot.new(@db)
actions = bot.action_for(history)
assert_equal([Edit[OSM::Relation[[ [OSM::Way,1] , [OSM::Way,2] ], :id => 1, :changeset => -1, :version => 2, "type" => "multipolygon"]],
Redact[OSM::Relation, 1, 2, :hidden]
], actions)
end
end

if __FILE__ == $0
Expand Down

0 comments on commit 5e5b1c0

Please sign in to comment.