From 0b94234a6bdea09ff7c3911a2b5fe6343223452b Mon Sep 17 00:00:00 2001 From: Shaun McDonald Date: Wed, 22 Apr 2009 11:03:22 +0000 Subject: [PATCH] adding the maximum number of elements in a changeset to the capabilities call, including test update --- app/controllers/api_controller.rb | 3 +++ test/functional/api_controller_test.rb | 1 + 2 files changed, 4 insertions(+) diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index ebf729afc..ca4cbcbd7 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -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 diff --git a/test/functional/api_controller_test.rb b/test/functional/api_controller_test.rb index 9056931b9..fdb36628e 100644 --- a/test/functional/api_controller_test.rb +++ b/test/functional/api_controller_test.rb @@ -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 -- 2.39.5