Commit graph

132 commits

Author SHA1 Message Date
Tom Hughes
b6b9d543ac Fix rubocop warnings 2017-10-29 19:43:02 +00:00
Tom Hughes
8dae890a76 Fix rubocop warnings 2017-10-05 19:18:38 +01:00
Andy Allan
396f2e28dd Rework coordinates to avoid scientific formatting of small numbers. Fixes #1509 2017-06-23 14:03:57 +01:00
Tom Hughes
b00b9ce626 Remove arguments from assert_nothing_raised
It has never done anything with the argument and rails 5.0 warns
that rails 5.1 will remove the argument.
2017-06-02 16:33:34 +01:00
Tom Hughes
5b33f3f8e3 Fix rubocop warnings 2017-06-02 00:08:30 +01:00
Andy Allan
86822ea225 Remove remaining references to fixtures. 2017-06-01 11:00:50 +01:00
Andy Allan
5d0ea28796 Remove the api_fixtures helper
This is no longer required, as the tests no longer use fixtures.
2017-06-01 10:59:48 +01:00
Andy Allan
aacc4bbc44 Refactor changeset tags model test to remove dependency on fixtures. 2017-05-31 16:49:17 +01:00
Andy Allan
e9fa94bce2 Refactor remaining relation model tests to use factories. 2017-05-31 14:59:11 +01:00
Andy Allan
3ef6fa4aa9 Refactor remaining way model tests to use factories. 2017-05-31 14:17:25 +01:00
Andy Allan
2e8c0d471f Ensure invisible_way is actually deleted 2017-05-17 16:05:23 +01:00
Andy Allan
084ae0f191 Refactor get_nodes_undelete test to use factories instead of fixtures. 2017-05-17 10:30:28 +01:00
Andy Allan
e69e8c9018 Refactor remaining way model tests to use factories.
Note that test_max_nodes_per_way_limit still has issues - see #1516
2017-05-17 09:56:44 +01:00
Andy Allan
805abe96d0 Create an old_way_node factory, and start using it for tests. 2017-04-25 16:29:13 +02:00
Andy Allan
05a42281ab Create an old_way factory, and start using it for tests. 2017-04-25 16:29:13 +02:00
Andy Allan
b46028b4f7 Create an old_relation_member factory, and start using it for tests. 2017-04-25 16:29:13 +02:00
Andy Allan
27c3edae25 Create an old_relation factory, and start using it for tests. 2017-04-25 15:19:25 +02:00
Andy Allan
b375050e6c Use node and relation_member factories for testing containing_relations and containing_relation_members 2017-04-05 11:33:33 +01:00
Tom Hughes
66d74a8c2c Merge remote-tracking branch 'openstreetmap/pull/1507' 2017-03-30 15:18:14 +01:00
Andy Allan
4fb775d6d5 Format latitudes and longitudes as %7f in XML output
This matches the double formatting in XML from cgimap. Fixes #341.
2017-03-30 14:30:54 +01:00
Andy Allan
5a0ba2e812 Add a with_history trait for node factories, to automatically create corresponding old_nodes 2017-03-30 09:31:22 +01:00
Tom Hughes
8a565061e3 Add explicit tests for lat/lon methods on node models 2017-03-22 20:43:39 +00:00
Tom Hughes
b78bb9f631 Merge remote-tracking branch 'openstreetmap/pull/1496' 2017-03-22 19:19:59 +00:00
Andy Allan
4ed1607784 Use node and old_node factories for redaction model tests. 2017-03-22 18:19:16 +00:00
Andy Allan
1a3130ec61 Create a node factory, and use it for most node model tests 2017-03-22 17:50:10 +00:00
Andy Allan
2d3ca85751 Use old_node factory for OldNode model tests.
The valid/invalid tests were simplified, since there is little to be
gained from inserting (invalid) nodes into the database and comparing
the node with another copy of itself.
2017-03-22 17:10:48 +00:00
Andy Allan
56752ac02a Create a changeset factory, and use it for model tests. 2017-03-22 10:47:24 +00:00
Andy Allan
48be941840 Remove the api_fixtures call from changeset model tests, since they do not need the fixtures. 2017-03-22 10:40:13 +00:00
Andy Allan
006627789f Create a redactions factory and use for model tests. 2017-03-15 16:24:39 +00:00
Andy Allan
f2479a8656 Use user factory for message model tests. 2017-03-09 11:52:31 +00:00
Andy Allan
c6c514fce7 Take the user from the node or changeset, rather than referring to the fixture. 2017-03-09 11:29:43 +00:00
Andy Allan
4736586355 Use user factory for note model test. 2017-03-09 11:06:07 +00:00
Andy Allan
8a6956eb22 Use user factory for oauth_token model test. 2017-03-09 11:04:29 +00:00
Andy Allan
5e78831d5c Use user factory for user_preference model tests. 2017-03-09 10:57:57 +00:00
Andy Allan
2267f44954 Use user factory for trace model tests. 2017-03-09 10:53:11 +00:00
Andy Allan
a3618d2b5f User factory associations for all factories. 2017-02-22 18:51:45 +00:00
Andy Allan
737a325f2e Refactor diary entry tests to use User factory 2017-02-19 16:43:32 +00:00
Tom Hughes
f435fce007 Link GPX fixture files instead of stubbing 2017-02-05 17:26:31 +00:00
Tom Hughes
0814b4096c Merge remote-tracking branch 'openstreetmap/pull/1347' into master 2017-02-05 16:02:20 +00:00
Tom Hughes
7793cd27ab Merge remote-tracking branch 'openstreetmap/pull/1423' 2017-02-02 17:21:41 +00:00
Andy Allan
1041ead253 Convert the test_users_nearby to user factories. 2017-02-02 13:52:26 +00:00
Andy Allan
3b26ff0c40 Use factory for user language tests 2017-02-02 13:33:15 +00:00
Andy Allan
b83271de92 Refactor the friend_users test, and remove the tests which duplicate the (renamed) test_friends_with above. 2017-02-02 13:24:46 +00:00
Andy Allan
f96c563c10 Convert test_friend_with to use factories, and use alice/bob/charlie for easier understanding. 2017-02-02 13:20:51 +00:00
Andy Allan
584748fe0a User factory for uniqueness tests 2017-02-02 13:09:39 +00:00
Andy Allan
df6469c76b Convert class method tests to use User factory.
Also improve the tests by being explicit about which results should
be returned, rather than just hoping that the fixtures cover all
possibilities.
2017-02-02 13:05:43 +00:00
Andy Allan
0bd2e9ea8c Add status traits to user factory. 2017-02-02 12:55:32 +00:00
Andy Allan
38fc6331af Add moderator_user and administrator_user factories. 2017-02-02 12:38:19 +00:00
Andy Allan
9e591d8ccb Add with_home_location trait for user factories. 2017-02-02 12:08:36 +00:00
Andy Allan
589e9802a9 Create a simple user factory, and convert some basic tests. 2017-02-01 17:42:05 +00:00