Commit graph

25 commits

Author SHA1 Message Date
Matt Amos
67dd9e4c9d Adding first cut of Redactions support
Redactions support hiding historical versions of elements and
collecting meta-data about that action together.
2012-04-05 13:46:36 +01:00
Tom Hughes
1340fca8f1 Turn on mass assignment protection
Require any attribute that is going to be mass assigned to be
whitelisted, and whitelist those attributes which need it
2012-03-06 08:54:45 +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
Shaun McDonald
43a28065b1 Change the way that the changeset parsing is done, so that it is in line with the nodes/ways/relations and gives much nicer error messages. Adding some tests too to back up those changes. 2009-12-06 02:13:30 +00:00
Shaun McDonald
65eb6af303 Give a nice error message when parsing the nwr tags and they are missing the k and/or v. Also includes tests. 2009-06-11 11:08:37 +00:00
Shaun McDonald
37df03a043 Cleanup the Relation.from_xml to come in line with the Way and Node versions. Includes tests. Bug fix for the previous tests. 2009-06-10 17:17:03 +00:00
Shaun McDonald
e4d7b3ee66 Throw errors in the way xml parsing if there is a problem. Bring the way parsing in line with the node parsing. Properly deal with the 0 id case. Some Way.from_xml tests. 2009-06-10 15:42:12 +00:00
Shaun McDonald
3170600b9c More Node.from_xml unit tests 2009-06-09 14:37:47 +00:00
Shaun McDonald
e3693d487a More unit tests for the parsing of the Node.from_xml. Some code clean up to ensure that a node that cannot be parsed will always throw an exception, to be handled by the arround handler. 2009-06-08 18:53:19 +00:00
Tom Hughes
2f3e23f6eb Move to version 2.3.2 of rails. 2009-06-04 08:08:24 +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
Matt Amos
f492a1b709 Fixed unit tests and fixture loading for postgres. The foreign keys were playing havoc with the tests when only some fixtures were loaded. 2009-03-28 20:18:26 +00:00
Shaun McDonald
e9527b363d Refactoring the amf controller, and all models so that save_with_history! is now private. Everyone should use create_with_history, delete_with_history, and update_from instead. Also gets the amf controller to do version checks in the node/way/relation models. Needs checked. This breaks Potlatch until #1376 is fixed. 2008-12-04 17:30:17 +00:00
Shaun McDonald
1375095343 More model validations. Fixing one test. 2008-11-25 17:23:47 +00:00
Shaun McDonald
e18c33f733 Prepare for Rails 2.1+, as we will no longer be able to use a symbol in the set_fixture_class method, instead we must use a Class. This change doesn't affect Rails 2.0.2, as currently used. All tests still work. :-) 2008-10-27 18:45:28 +00:00
Matt Amos
2c5f6740c7 Small fixes to unit tests where user_id has become changeset_id. 2008-10-09 10:19:16 +00:00
Shaun McDonald
87494900df more testing of node tags 2008-08-18 13:55:21 +00:00
Shaun McDonald
c9a171c745 Removing the in_world test from the model since it is included in the geo_record library. Adding visible and version to the nodes and current_nodes fixtures. Adding old node test. Slightly different comparisions. 2008-07-08 18:17:08 +00:00
Shaun McDonald
dce4f18a3e node unit tests with inside limits now. 2008-07-08 15:38:31 +00:00
Shaun McDonald
64a5e21f53 Fixing the resync that I had done wrong at the end of last week on the nodes. All unit tests now do work. More assertions added. Using a scaling factor as a constant, so that the nodes are stored in the db correctly. Using the same scaling factor in the georecord library, to make code more readable, and reduce errors. Removing duplicate code that is in the GeoRecord include library. 2008-07-07 14:20:27 +00:00
Shaun McDonald
0a459023d3 Now all the unit tests work 2008-07-03 10:56:17 +00:00
Shaun McDonald
abb93de627 Adding some additional node fixtures to test edge cases. Having a bit of an issue as the too far north and south tests aren't working as expected, even so the too far east and west ones are. 2008-06-02 17:27:32 +00:00
Shaun McDonald
f97c16d5c4 You can now test nodes. This test needs looked at again, as it currently doesn't test the node tags 2008-06-02 15:28:03 +00:00
Gabriel Ebner
cfbdd3f7e1 Merge rails_port as of r4613 & fix tests. 2007-09-20 14:37:29 +00:00
Tom Hughes
b13eb8824e Add some basic tests for nodes. 2007-07-24 22:58:16 +00:00