]> git.openstreetmap.org Git - rails.git/commitdiff
adding the maximum number of elements in a changeset to the capabilities call, includ...
authorShaun McDonald <shaun@shaunmcdonald.me.uk>
Wed, 22 Apr 2009 11:03:22 +0000 (11:03 +0000)
committerShaun McDonald <shaun@shaunmcdonald.me.uk>
Wed, 22 Apr 2009 11:03:22 +0000 (11:03 +0000)
app/controllers/api_controller.rb
test/functional/api_controller_test.rb

index ebf729afc322812002231adeeefe6e486a756367..ca4cbcbd7c3439304a6ed38179c25c6fb2ad6bfa 100644 (file)
@@ -284,6 +284,9 @@ class ApiController < ApplicationController
     waynodes = XML::Node.new 'waynodes'
     waynodes['maximum'] = APP_CONFIG['max_number_of_way_nodes'].to_s
     api << waynodes
+    changesets = XML::Node.new 'changesets'
+    changesets['maximum_elements'] = Changeset::MAX_ELEMENTS.to_s
+    api << changesets
     
     doc.root << api
 
index 9056931b95f700af970c2b338e7fd7ce98f59e16..fdb36628e4c82d6ef8c8ff32a6eac34be3fbda1f 100644 (file)
@@ -219,6 +219,7 @@ class ApiControllerTest < ActionController::TestCase
         assert_select "version[minimum=#{API_VERSION}][maximum=#{API_VERSION}]", :count => 1
         assert_select "area[maximum=#{APP_CONFIG['max_request_area']}]", :count => 1
         assert_select "tracepoints[per_page=#{APP_CONFIG['tracepoints_per_page']}]", :count => 1
+        assert_select "changesets[maximum_elements=#{Changeset::MAX_ELEMENTS}]", :count => 1
       end
     end
   end