]> git.openstreetmap.org Git - rails.git/commitdiff
Return maximum size of bounding box for note retrieval
authorSimon Poole <simon@rails-dev.poole.ch>
Mon, 13 Mar 2017 07:47:01 +0000 (08:47 +0100)
committerSimon Poole <simon@rails-dev.poole.ch>
Mon, 13 Mar 2017 07:53:49 +0000 (08:53 +0100)
app/controllers/api_controller.rb
test/controllers/api_controller_test.rb

index eb59a8a8df0bda5da97d218ceee62bd99ed4393d..ce1a217cd130c5fa5e07ac210a56b1c9621435f8 100644 (file)
@@ -263,6 +263,9 @@ class ApiController < ApplicationController
     area = XML::Node.new "area"
     area["maximum"] = MAX_REQUEST_AREA.to_s
     api << area
+    notearea = XML::Node.new "note_area"
+    notearea["maximum"] = MAX_NOTE_REQUEST_AREA.to_s
+    api << notearea
     tracepoints = XML::Node.new "tracepoints"
     tracepoints["per_page"] = TRACEPOINTS_PER_PAGE.to_s
     api << tracepoints
index 1ad53145ab4274f287c45803af7a2ee73bb49e66..5aac44a4fe7242b0184116e950a713092932cfef 100644 (file)
@@ -364,6 +364,7 @@ class ApiControllerTest < ActionController::TestCase
       assert_select "api", :count => 1 do
         assert_select "version[minimum='#{API_VERSION}'][maximum='#{API_VERSION}']", :count => 1
         assert_select "area[maximum='#{MAX_REQUEST_AREA}']", :count => 1
+        assert_select "note_area[maximum='#{MAX_NOTE_REQUEST_AREA}']", :count => 1
         assert_select "tracepoints[per_page='#{TRACEPOINTS_PER_PAGE}']", :count => 1
         assert_select "changesets[maximum_elements='#{Changeset::MAX_ELEMENTS}']", :count => 1
         assert_select "status[database='online']", :count => 1