Fix rubocop style issues
This commit is contained in:
parent
baf10cd392
commit
5cbd4038ed
47 changed files with 530 additions and 638 deletions
|
@ -57,9 +57,9 @@ class RedactionsControllerTest < ActionController::TestCase
|
|||
|
||||
# remove all elements from the redaction
|
||||
redaction = redactions(:example)
|
||||
redaction.old_nodes.each { |n| n.redaction = nil; n.save! }
|
||||
redaction.old_ways.each { |w| w.redaction = nil; w.save! }
|
||||
redaction.old_relations.each { |r| r.redaction = nil; r.save! }
|
||||
redaction.old_nodes.each { |n| n.update!(:redaction => nil) }
|
||||
redaction.old_ways.each { |w| w.update!(:redaction => nil) }
|
||||
redaction.old_relations.each { |r| r.update!(:redaction => nil) }
|
||||
|
||||
delete :destroy, :id => redaction.id
|
||||
assert_response :redirect
|
||||
|
|
|
@ -108,9 +108,7 @@ class RelationControllerTest < ActionController::TestCase
|
|||
get :full, :id => current_relations(:visible_relation).id
|
||||
assert_response :success
|
||||
# FIXME check whether this contains the stuff we want!
|
||||
if $VERBOSE
|
||||
print @response.body
|
||||
end
|
||||
print @response.body if $VERBOSE
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -930,9 +928,8 @@ OSM
|
|||
##
|
||||
# returns a k->v hash of tags from an xml doc
|
||||
def get_tags_as_hash(a)
|
||||
a.find("//osm/relation/tag").sort_by { |v| v['k'] }.inject({}) do |h, v|
|
||||
a.find("//osm/relation/tag").sort_by { |v| v['k'] }.each_with_object({}) do |v, h|
|
||||
h[v['k']] = v['v']
|
||||
h
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue