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
d23d2c9d05
Extra little test, setting the language on the diary fixtures.
2009-05-15 15:41:45 +00:00
Matt Amos
66ae650c95
Oops. Fixed another Time/DateTime problem.
2009-05-14 13:13:09 +00:00
Matt Amos
71192daef2
Fixed problem with Time vs. DateTime classes in fixtures. Weirdly only affected mysql backend.
2009-05-14 11:52:15 +00:00
Matt Amos
d7badc8402
Fixed precondition failed message which was trying to dereference nil.
2009-05-14 11:19:28 +00:00
Matt Amos
1ceb4ab9ba
Fixed bug #1816 - the timeout updating logic should have been in a before_save handler, not in save_with_tags.
2009-05-12 13:54:37 +00:00
Tom Hughes
ed68d524de
Use a local lookup table for country bounding boxes rather than relying
...
on geonames.org being able to do it in a reasonable time.
2009-05-11 16:50:09 +00:00
Matt Amos
535bc8f1d8
disabling test case because i don't think there is a fix with the current version of composite_primary_keys.
2009-05-11 16:17:36 +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
43988beec3
A better optimisation, as suggested by TomH.
2009-05-11 15:16:36 +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
Shaun McDonald
9156448ad6
fix the user unit test so that it doesn't use a depricated method in rails 2.2.2
2009-05-08 17:26:23 +00:00
Shaun McDonald
e84dd63b16
more changeset tests. No need for @ vars in the tests
2009-05-08 13:12:53 +00:00
Thomas Wood
86caeb3360
Fix the test I just broke...
2009-05-07 22:58:32 +00:00
Shaun McDonald
98a76339b8
Some more tests
2009-05-07 17:57:59 +00:00
Shaun McDonald
6327e3e690
fix typo which meant that it was testing the node twice, rather than the node then the node history
2009-05-07 14:10:17 +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
e509850554
fixing the tests I broke earlier due to the fixture changes
2009-05-06 17:56:10 +00:00
Shaun McDonald
d10931effa
More trace tests
2009-05-06 14:58:48 +00:00
Shaun McDonald
589e5835c8
some tests for the site and export controllers
2009-05-05 18:31:37 +00:00
Thomas Wood
026d7775d2
Fix indentation fail
2009-05-01 21:01:02 +00:00
Thomas Wood
38d8f178f6
Fix AMF controller failing tests due to changed error messages.
2009-05-01 20:49:51 +00:00
Shaun McDonald
d5a6efca7f
a fix for the relation controller test
2009-05-01 10:29:19 +00:00
Matt Amos
264b92bd9f
Fixed bad coding practice in test.
2009-04-30 18:12:23 +00:00
Matt Amos
9cd381037a
Fixed indeterminacy in test.
2009-04-30 18:09:54 +00:00
Matt Amos
5fe85e39a4
Fix failing test case.
2009-04-30 17:37:18 +00:00
Shaun McDonald
44c5248c1a
couple of fixes to the changeset upload delete
2009-04-30 17:25:53 +00:00
Shaun McDonald
db17af19bb
fix more of the tests, particularly changeset controller. Needed more fixtures to fix them. The last failing changeset controller test needs some more work on the fixtures.
2009-04-29 22:25:49 +00:00
Shaun McDonald
dcca3ab0e9
More changeset test improvements. Another fixture was required for one of the tests
2009-04-29 17:29:58 +00:00
Matt Amos
3e9b6845d3
Fixed 'raw' raises by converting them to the appropriate OSM::APIError type. Made the error messages for placeholder fixing more informative. Added tests for these.
2009-04-29 10:07:35 +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
77a34278ca
Backout broken attempt at making case insensitive authentication work
...
on Postgres. As implemented this forces a table scan to authenticate
users which is ridiculous to save people pressing the shift key.
2009-04-23 23:46:45 +00:00
Shaun McDonald
f1a0331081
Hack a way to make the email and display name case insensitive for logging in, based on a suggestion by firefishy to use ILIKE. Changes requested from users on mailing list. Includes some tests to check the case insensitivity of the username, and and e-mail address on login.
2009-04-23 19:20:08 +00:00
Shaun McDonald
9ca382605c
Fixing the create relation test, which now also tests to make sure that private users cannot edit.
2009-04-22 14:38:23 +00:00
Shaun McDonald
0b94234a6b
adding the maximum number of elements in a changeset to the capabilities call, including test update
2009-04-22 11:03:22 +00:00
Shaun McDonald
38e94c6baa
fixing some of the relation tests. Some adjustments to the fixtures.
2009-04-22 00:42:23 +00:00
Matt Amos
0b76693672
Adding more tests for updating relation tags.
2009-04-21 20:33:16 +00:00
Matt Amos
d5d9b1a374
Extra test for updating relation tags.
2009-04-21 19:53:14 +00:00
Matt Amos
6488ebe12f
More test fixes after fixture changes.
2009-04-21 19:51:43 +00:00
Matt Amos
0f111e7e2a
Fixed formatting and stuff in fixtures.
2009-04-21 18:37:24 +00:00
Shaun McDonald
b27e534b2e
Add new fixtures for testing multiple tags on a relation.
2009-04-21 17:54:59 +00:00
Shaun McDonald
0ad724bd92
Hopefully fix the old_node_controller tests.
2009-04-21 17:07:14 +00:00
Shaun McDonald
0dd0f1881d
Fixing some of the tests, adding the new tests to make sure that you can't edit when your not a public user
2009-04-18 17:17:22 +00:00
Shaun McDonald
08bd1688ee
Railsify the relation member model, type attribute, by putting it into class case, rather than lower case. Requires reload of postgres databases or manual change to the enum. Fixes the databrowser on postgres, however affects the rest of the codebase.
2009-04-15 14:49:21 +00:00
Shaun McDonald
ed87bd73f3
Remove function that is in the test help from functional test
2009-04-14 11:52:56 +00:00
Shaun McDonald
d84d5c68de
Remove function that is in the test help from functional test
2009-04-14 11:39:46 +00:00
Shaun McDonald
72a3947b1b
remove the dup methods from the test helper. Add tests for no content and checking that a record has been created.
2009-04-13 00:13:51 +00:00
Shaun McDonald
90ec90f13d
reverting last change, which included posgres config specific things
2009-04-13 00:10:37 +00:00
Shaun McDonald
2c52b06716
Remove duplication that is in the test helper. Adding tests for the passing of no content, and the wrong method used. Also ensuring that there has been a changeset added to the db when it is created.
2009-04-13 00:04:24 +00:00