Added a bunch more tests on the API 0.6. Fixed node/way/relation from_xml code to disallow duplicate tag keys.

This commit is contained in:
Matt Amos 2008-10-13 17:50:15 +00:00
parent 9e1946b283
commit cf24a5a3ee
5 changed files with 157 additions and 9 deletions

View file

@ -71,9 +71,8 @@ class NodeController < ApplicationController
else
render :nothing => true, :status => :bad_request
end
rescue OSM::APIVersionMismatchError => ex
render :text => "Version mismatch: Provided " + ex.provided.to_s +
", server had: " + ex.latest.to_s, :status => :bad_request
rescue OSM::APIError => ex
render ex.render_opts
rescue ActiveRecord::RecordNotFound
render :nothing => true, :status => :not_found
end