Fix new rubocop warnings
This commit is contained in:
parent
3988940e3c
commit
a83030dab7
37 changed files with 94 additions and 213 deletions
|
@ -1,8 +1,9 @@
|
|||
require "test_helper"
|
||||
require "stringio"
|
||||
include Potlatch
|
||||
|
||||
class AmfControllerTest < ActionController::TestCase
|
||||
include Potlatch
|
||||
|
||||
##
|
||||
# test all routes which lead to this controller
|
||||
def test_routes
|
||||
|
@ -730,8 +731,8 @@ class AmfControllerTest < ActionController::TestCase
|
|||
# This node has no tags
|
||||
|
||||
# create a node with random lat/lon
|
||||
lat = rand(100) - 50 + rand
|
||||
lon = rand(100) - 50 + rand
|
||||
lat = rand(-50..49) + rand
|
||||
lon = rand(-50..49) + rand
|
||||
|
||||
changeset = create(:changeset)
|
||||
user = changeset.user
|
||||
|
@ -770,8 +771,8 @@ class AmfControllerTest < ActionController::TestCase
|
|||
# This node has some tags
|
||||
|
||||
# create a node with random lat/lon
|
||||
lat = rand(100) - 50 + rand
|
||||
lon = rand(100) - 50 + rand
|
||||
lat = rand(-50..49) + rand
|
||||
lon = rand(-50..49) + rand
|
||||
|
||||
amf_content "putpoi", "/2", ["#{user.email}:test", changeset.id, nil, nil, lon, lat, { "key" => "value", "ping" => "pong" }, nil]
|
||||
post :amf_write
|
||||
|
@ -811,8 +812,8 @@ class AmfControllerTest < ActionController::TestCase
|
|||
# This node has no tags
|
||||
|
||||
# create a node with random lat/lon
|
||||
lat = rand(100) - 50 + rand
|
||||
lon = rand(100) - 50 + rand
|
||||
lat = rand(-50..49) + rand
|
||||
lon = rand(-50..49) + rand
|
||||
|
||||
changeset = create(:changeset)
|
||||
user = changeset.user
|
||||
|
@ -847,8 +848,8 @@ class AmfControllerTest < ActionController::TestCase
|
|||
# This node has no tags
|
||||
|
||||
# create a node with random lat/lon
|
||||
lat = rand(100) - 50 + rand
|
||||
lon = rand(100) - 50 + rand
|
||||
lat = rand(-50..49) + rand
|
||||
lon = rand(-50..49) + rand
|
||||
|
||||
changeset = create(:changeset)
|
||||
user = changeset.user
|
||||
|
|
|
@ -812,9 +812,7 @@ CHANGESET
|
|||
assert_equal 2, Node.find(new_node_id).tags.size, "new node should have two tags"
|
||||
assert_equal [new_node_id, node.id], Way.find(way.id).nds, "way nodes should match"
|
||||
Relation.find(relation.id).members.each do |type, id, _role|
|
||||
if type == "node"
|
||||
assert_equal new_node_id, id, "relation should contain new node"
|
||||
end
|
||||
assert_equal new_node_id, id, "relation should contain new node" if type == "node"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ class NodeControllerTest < ActionController::TestCase
|
|||
changeset = create(:changeset, :user => user)
|
||||
|
||||
# create a node with random lat/lon
|
||||
lat = rand(100) - 50 + rand
|
||||
lon = rand(100) - 50 + rand
|
||||
lat = rand(-50..50) + rand
|
||||
lon = rand(-50..50) + rand
|
||||
|
||||
## First try with no auth
|
||||
# create a minimal xml file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue