summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
892c30a)
The old_node_controller#test_version in particular was slow, since
it saves a huge number of tags when adding a tag 30 times over. Since
the tests are random and not based on the number of iterations, this
reduces the iteration counts.
end
def test_repeated_changeset_create
end
def test_repeated_changeset_create
basic_authorization create(:user).email, "test"
# create a temporary changeset
basic_authorization create(:user).email, "test"
# create a temporary changeset
versions[xml_node["version"]] = xml_doc.to_s
# randomly move the node about
versions[xml_node["version"]] = xml_doc.to_s
# randomly move the node about
# move the node somewhere else
xml_node["lat"] = precision(rand * 180 - 90).to_s
xml_node["lon"] = precision(rand * 360 - 180).to_s
# move the node somewhere else
xml_node["lat"] = precision(rand * 180 - 90).to_s
xml_node["lon"] = precision(rand * 360 - 180).to_s
end
# add a bunch of random tags
end
# add a bunch of random tags
xml_tag = XML::Node.new("tag")
xml_tag["k"] = random_string
xml_tag["v"] = random_string
xml_tag = XML::Node.new("tag")
xml_tag["k"] = random_string
xml_tag["v"] = random_string
versions[xml_node["version"]] = xml_doc.to_s
# randomly move the node about
versions[xml_node["version"]] = xml_doc.to_s
# randomly move the node about
# move the node somewhere else
xml_node["lat"] = precision(rand * 180 - 90).to_s
xml_node["lon"] = precision(rand * 360 - 180).to_s
# move the node somewhere else
xml_node["lat"] = precision(rand * 180 - 90).to_s
xml_node["lon"] = precision(rand * 360 - 180).to_s
end
# add a bunch of random tags
end
# add a bunch of random tags
xml_tag = XML::Node.new("tag")
xml_tag["k"] = random_string
xml_tag["v"] = random_string
xml_tag = XML::Node.new("tag")
xml_tag["k"] = random_string
xml_tag["v"] = random_string