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
Andy Allan
8a6e8ae128
Convert client applications fixtures into a factory
...
Closes #1415
2017-01-26 18:03:51 +00:00
Tom Hughes
e1cac818b1
Merge remote-tracking branch 'openstreetmap/pull/1416'
2017-01-26 17:51:13 +00:00
Tom Hughes
ba092de0ac
Load user fixtures for ChangesetComment model tests
2017-01-26 17:50:11 +00:00
Andy Allan
7b0b09a527
Remove unused user_tokens fixture and pointless test.
2017-01-25 16:43:04 +00:00
Tom Hughes
69b967c9ff
Add support for Wikimedia authentication
...
Closes #1146
2016-12-20 22:32:25 +00:00
Tom Hughes
9badc45929
Load api fixtures in tag model tests
...
We still need them so we have the object to attach tags to.
2016-12-18 17:00:52 +00:00
Tom Hughes
0da97d2d3c
Get rid of hardwired counts in assertions
2016-12-18 16:43:58 +00:00
Tom Hughes
970e1a99d7
Merge remote-tracking branch 'openstreetmap/pull/1367'
2016-12-18 16:29:33 +00:00
Tom Hughes
b9b255fa65
Work around upcoming minitest insanity
...
Minitest 6 will not allow assert_equal to compare for equality
with nil and minitest 5 has already started warning about it.
That's fine if you're comparing with a nil constant, but if you're
comparing with an expression that is sometimes nil and sometimes
not nil it's an absolute pain in the rear end.
2016-12-02 22:29:44 +00:00
Andy Allan
a66f0f32e9
Rename test trace fixtures to use letters instead of numbers.
...
This prevents them from being deleted by mistake, if trace.delete is
called on a factory-generated trace with a coincidental id.
2016-11-16 17:45:26 +00:00
Tom Hughes
e84f0c710d
Reject oauth nonces over a day old
2016-11-03 07:14:19 +00:00
Andy Allan
aa185bf4f8
Replace fixtures with factory for relation_tags
2016-10-31 12:30:57 +01:00
Andy Allan
97d63db369
Replace fixtures with factory for way_tags
2016-10-31 11:49:51 +01:00
Andy Allan
3026af170a
Replace fixtures with factory for node_tags
2016-10-30 18:28:01 +01:00
Andy Allan
aba28ec9e0
Replace fixtures with a factory for old_relation_tags
2016-10-30 16:32:11 +01:00
Andy Allan
e308da8daf
Convert fixtures to factory for old_way_tags
2016-10-30 16:15:23 +01:00
Andy Allan
acb7f44069
Replace fixtures with a factory for old_node_tags
...
Also includes a slight simplification of the old_node_tags tests.
2016-10-30 15:36:33 +01:00
Andy Allan
596494a590
Replace changeset_tags fixtures with a factory.
2016-10-30 12:45:02 +01:00
Andy Allan
ea502ac9df
Rubocop fix.
2016-10-29 17:32:50 +02:00
Andy Allan
15689af6bf
Replace trace-related fixtures with factories.
...
The mocking and stubbing in the controller tests is
unfortunate, but the models interact directly with the filesystem
using the trace id so that's hard to control any other way.
2016-10-29 16:23:04 +02:00
Tom Hughes
2df3605142
Merge remote-tracking branch 'openstreetmap/pull/1339'
2016-10-26 15:54:42 +01:00
Tom Hughes
8920a56133
Merge remote-tracking branch 'openstreetmap/pull/1338'
2016-10-26 15:48:56 +01:00
Tom Hughes
3371ca37f1
Merge remote-tracking branch 'openstreetmap/pull/1337'
2016-10-26 15:41:30 +01:00
Andy Allan
c365e2b28a
Convert the languages fixtures to a factory
...
For some tests, the existance of an 'en' language is assumed by
the database structure (not null default 'en'::character varying) so
this can be created in a setup block.
2016-10-26 13:14:52 +01:00
Andy Allan
a280f72bee
Replace messages fixtures with a factory.
2016-10-26 11:41:18 +01:00
Andy Allan
72ae20ea3c
Replace user_preferences fixture with a factory.
2016-10-26 10:07:49 +01:00
Andy Allan
162f04d789
Convert ACL fixture to a factory, and add some tests
...
The fixture was unused, so I took the opportunity to put in a couple
of basic model tests.
2016-10-26 09:15:56 +01:00
Tom Hughes
6a9b0f05b2
Load user and language fixtures for diary model tests
2016-10-19 12:17:20 +01:00
Andy Allan
feb3b03227
Use model relations when creating objects from factories
...
Rather than passing around record ids explicitly, we can use the
model relations and pass around the models. This makes reading the
tests slightly simpler to read.
2016-10-19 11:32:08 +01:00
Andy Allan
a91e50d308
Replace changeset_comments fixtures with a factory.
...
There's little point in testing ChangesetComment.count so I've removed that
test.
2016-10-12 15:44:27 +01:00
Tom Hughes
61eac42a82
Makr author/author_ip tests more consistent
2016-10-10 13:54:58 +01:00
Tom Hughes
3123822bba
Merge remote-tracking branch 'openstreetmap/pull/1312'
2016-10-10 13:48:09 +01:00