X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/124ec2e9d560e0df291e5a8e5aa67ef5db2f5d46..9efa2c7b92952b7d72bd5dc35dd22deb79d50b35:/test/controllers/amf_controller_test.rb diff --git a/test/controllers/amf_controller_test.rb b/test/controllers/amf_controller_test.rb index 83ef03bbf..bd7a51884 100644 --- a/test/controllers/amf_controller_test.rb +++ b/test/controllers/amf_controller_test.rb @@ -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