Reorganise tests to match modern rails test layout
Add functional tests for nodes/ways/relations API methods
Guard against non-numeric lat and lons in nodes and notes
Don't show coordinates for deleted nodes
Add routing tests for all supported routes
Rename all ID columns that aren't unique Having a table with a column called ID that is only part of the primary key really doesn't work as rails likes to treat ID as a special name so it becomes impossible to assign to it or read it.
List all objects that are blocking a delete, in a well defined order
Made XML parsing routines raise an exception if the document is valid XML, but not valid as an OSM document. This is now the same behaviour as when the document isn't valid XML.
Node controller wasn't using the right name for an exception class.
Rationalise API error classes by getting of the render_opts method which was never used except to extract the data it contained. Instead each class now has a status method that returns the HTTP status code to use and a to_s method to return a textual description of the error.
Using an around_handler for catching and rendering errors in most of the API controller methods. This simplifies the code and makes errors and error messages a bit more consistent. Also added a utility method for checking the HTTP method.
Use a regular expression for the test, since it can give one of two responses based on the order in the db.
Fixed problem where tag lengths were generating a 422 error with no message. They now generate a 400 error with a meaningful message.
Tests for PreconditionFailed error messages. Change to relation.rb to bring element selection in-line with that of way, so to return nil to be caught later, rather than raise an error. Change to way.rb to clarify which way on diff upload.
Fix the node and relation tests from when the users with data public=false were disallowed from editing. Needed extra fixtures.
Make node update work with the new require data public to edit policy. Added convenience testing method for the require data public. Add 2 new fixtures that are owned by the public user.
Merge 12304:14009 from trunk.
Improving the not found handling of preferences. adding a user preference test. adding some utility methods to the test helper
ensure that uploads that don't supply a lat and lon for a node. Adding related test and fixing other tests.
better handling of duplicate tags. Extra validation in the tests.