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 ebf729a..ca4cbcb 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 9056931..fdb3662 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