Commit graph

28 commits

Author SHA1 Message Date
Ian Dees
9d2fed811f Guard against non-numeric lat and lons in nodes and notes 2013-06-24 22:34:09 +01:00
Andy Allan
2c67c079ac Don't show coordinates for deleted nodes 2012-07-11 14:42:01 +01:00
Tom Hughes
90e46a58de Add routing tests for all supported routes 2012-03-09 19:49:44 +00:00
Tom Hughes
fc25c3d412 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.
2011-11-14 09:42:52 +00:00
Tom Hughes
1da4cecaf6 List all objects that are blocking a delete, in a well defined order 2011-11-14 09:42:49 +00:00
Matt Amos
bb84a78a09 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. 2009-08-06 17:28:49 +00:00
Matt Amos
e93becd304 Node controller wasn't using the right name for an exception class. 2009-08-05 11:28:49 +00:00
Tom Hughes
4a4d89138c 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.
2009-05-21 19:28:39 +00:00
Matt Amos
3d0ca940d2 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. 2009-05-20 17:39:59 +00:00
Shaun McDonald
c7f134943c Use a regular expression for the test, since it can give one of two responses based on the order in the db. 2009-05-11 15:50:03 +00:00
Matt Amos
b7f306a437 Fixed problem where tag lengths were generating a 422 error with no message. They now generate a 400 error with a meaningful message. 2009-05-10 00:33:55 +00:00
Thomas Wood
c273b4b1fa 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.
2009-05-06 21:08:50 +00:00
Shaun McDonald
f47ba4fb23 Fix the node and relation tests from when the users with data public=false were disallowed from editing. Needed extra fixtures. 2009-04-27 11:57:58 +00:00
Shaun McDonald
10fdeb2021 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. 2009-04-26 22:46:41 +00:00
Tom Hughes
c8ee135104 Merge 12304:14009 from trunk. 2009-03-08 13:02:37 +00:00
Shaun McDonald
c76e60f052 Improving the not found handling of preferences. adding a user preference test. adding some utility methods to the test helper 2008-12-12 18:54:03 +00:00
Shaun McDonald
e989b1a880 ensure that uploads that don't supply a lat and lon for a node. Adding related test and fixing other tests. 2008-12-01 18:32:54 +00:00
Shaun McDonald
6e98e324e5 better handling of duplicate tags. Extra validation in the tests. 2008-11-28 17:38:23 +00:00
Shaun McDonald
427becc1db Moving all the functional tests to the Rails 2 way, which uses less code by having an additional sub-class to take care of the duplicate code in every test. There is a bug in rails 2.0.2, which means that super doesn't get called in the setup method in the functional tests. This is fixed in Rails 2.1.2, thus a version bump should really be done. 2008-10-28 12:27:10 +00:00
Matt Amos
b56f57ec43 Fixed up delete methods on nodes, ways and relations to return the new version number and added some more tests. 2008-10-14 14:27:12 +00:00
Matt Amos
cf24a5a3ee Added a bunch more tests on the API 0.6. Fixed node/way/relation from_xml code to disallow duplicate tag keys. 2008-10-13 17:50:15 +00:00
Matt Amos
a2498928e4 Fixed node functional tests. A couple of changes to the old_node model and node controller for changesets. 2008-10-13 14:08:31 +00:00
Shaun McDonald
2347761266 some useful notes in code for ideas that require implementing. 2008-10-07 23:49:53 +00:00
Shaun McDonald
3d5ee2675b Now just got one test to sort on the functional tests. All other tests are working and pass. Plenty more to write though. 2008-07-22 14:06:53 +00:00
Frederik Ramm
d0aa199e92 - add old_relation_controller and stuff so that relation history works. fixes #557.
- minor testing fixes.
2008-03-16 23:16:18 +00:00
Tom Hughes
79457cd43e Factor out loading of the various fixtures needed to test API calls
into a shared method.
2007-07-27 08:47:35 +00:00
Frederik Ramm
efc4c6f85d added more tests 2007-07-26 22:05:51 +00:00
Tom Hughes
b13eb8824e Add some basic tests for nodes. 2007-07-24 22:58:16 +00:00