Improve test coverage
This commit is contained in:
parent
f8f921e09d
commit
f04211b172
16 changed files with 174 additions and 44 deletions
|
@ -18,6 +18,7 @@ module GeocoderHelper
|
|||
html << result[:prefix] if result[:prefix]
|
||||
html << " " if result[:prefix] && result[:name]
|
||||
html << link_to(result[:name], url, html_options) if result[:name]
|
||||
html << " " if result[:suffix] && result[:name]
|
||||
html << result[:suffix] if result[:suffix]
|
||||
html.html_safe
|
||||
end
|
||||
|
|
|
@ -120,10 +120,6 @@ class Changeset < ActiveRecord::Base
|
|||
self.num_changes += elements
|
||||
end
|
||||
|
||||
def tags_as_hash
|
||||
tags
|
||||
end
|
||||
|
||||
def tags
|
||||
unless @tags
|
||||
@tags = {}
|
||||
|
|
|
@ -93,11 +93,6 @@ class OldRelation < ActiveRecord::Base
|
|||
el
|
||||
end
|
||||
|
||||
# Temporary method to match interface to nodes
|
||||
def tags_as_hash
|
||||
tags
|
||||
end
|
||||
|
||||
# Temporary method to match interface to relations
|
||||
def relation_members
|
||||
old_members
|
||||
|
|
|
@ -116,11 +116,6 @@ class OldWay < ActiveRecord::Base
|
|||
points
|
||||
end
|
||||
|
||||
# Temporary method to match interface to nodes
|
||||
def tags_as_hash
|
||||
tags
|
||||
end
|
||||
|
||||
# Temporary method to match interface to ways
|
||||
def way_nodes
|
||||
old_nodes
|
||||
|
|
|
@ -262,11 +262,6 @@ class Relation < ActiveRecord::Base
|
|||
true
|
||||
end
|
||||
|
||||
# Temporary method to match interface to nodes
|
||||
def tags_as_hash
|
||||
tags
|
||||
end
|
||||
|
||||
##
|
||||
# if any members are referenced by placeholder IDs (i.e: negative) then
|
||||
# this calling this method will fix them using the map from placeholders
|
||||
|
|
|
@ -83,16 +83,6 @@ class Way < ActiveRecord::Base
|
|||
way
|
||||
end
|
||||
|
||||
# Find a way given it's ID, and in a single SQL call also grab its nodes
|
||||
#
|
||||
|
||||
# You can't pull in all the tags too unless we put a sequence_id on the way_tags table and have a multipart key
|
||||
def self.find_eager(id)
|
||||
Way.find(id, :include => { :way_nodes => :node })
|
||||
# If waytag had a multipart key that was real, you could do this:
|
||||
# Way.find(id, :include => [:way_tags, {:way_nodes => :node}])
|
||||
end
|
||||
|
||||
# Find a way given it's ID, and in a single SQL call also grab its nodes and tags
|
||||
def to_xml
|
||||
doc = OSM::API.new.get_xml_doc
|
||||
|
@ -242,11 +232,6 @@ class Way < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
# Temporary method to match interface to nodes
|
||||
def tags_as_hash
|
||||
tags
|
||||
end
|
||||
|
||||
##
|
||||
# if any referenced nodes are placeholder IDs (i.e: are negative) then
|
||||
# this calling this method will fix them using the map from placeholders
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue