Tom Hughes
cb3c4ec09b
Update for rubocop 0.54.0
2018-05-17 19:39:25 +01:00
Tom Hughes
b6b9d543ac
Fix rubocop warnings
2017-10-29 19:43:02 +00:00
Tom Hughes
5b33f3f8e3
Fix rubocop warnings
2017-06-02 00:08:30 +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
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
Tom Hughes
69b967c9ff
Add support for Wikimedia authentication
...
Closes #1146
2016-12-20 22:32:25 +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
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
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
bfe760a4b0
Replace friends fixture with a factory
2016-10-05 13:18:45 +01:00
Simon Poole
90b7101cc3
Add tests for change of gravatar use depending on email
2016-08-16 22:09:11 +02:00
Tom Hughes
c70a1fe933
Add support for GitHub authentication
2016-07-14 09:40:45 +01:00
Tom Hughes
4028f4cdb9
Rework locale selection
...
Implement our own matching algorithm rather than trying to
patch the http_accept_language one and make sure everything is
using it in a consistent way.
Fixes #1125
2016-01-06 18:43:25 +00:00
Tom Hughes
2b2264ddab
Add support for Windows Live authentication
2015-05-19 14:04:09 +01:00
Tom Hughes
c9893e186b
Add support for Facebook authentication
2015-05-19 14:04:08 +01:00
Tom Hughes
ddaf43bc0e
Add tests for Google OAuth authentication
2015-04-14 10:08:07 +01:00
Tom Hughes
650adc10b2
Allow space as a language separator
...
The separator is supposed to be comma, so technically having
space instead is user error, but it seems to be very common.
Fixes #942
2015-03-31 20:53:51 +01:00
Tom Hughes
15b550182c
Yet more tests...
2015-03-02 21:20:01 +00:00
Tom Hughes
bc056a5e98
More test coverage improvements
2015-03-01 00:44:32 +00:00
Tom Hughes
f04211b172
Improve test coverage
2015-02-27 00:40:37 +00:00
Tom Hughes
dc2a2c8ebd
Standardise on double quoted strings
2015-02-20 19:47:26 +00:00
Tom Hughes
ef7f3d800c
Fix most auto-correctable rubocop issues
2015-02-20 08:56:16 +00:00
Tom Hughes
34e3e51456
Cleanup trailing whitespace
2015-02-20 08:56:16 +00:00
Tom Hughes
574220187b
Test that reserved usernames are not allowed
2014-10-02 19:54:26 +01:00
Tom Hughes
56d39b06f2
Rename User#public to User#identifiable
2014-07-04 19:24:25 +01:00
Tom Hughes
0cc579b287
Improve blocking of characters not allowed in XML
2014-06-19 00:25:18 +01:00
Tom Hughes
32c385e8d7
Probit control characters in user names
2014-06-15 16:33:26 +01:00
Tom Hughes
98184dfb9c
Reorganise tests to match modern rails test layout
2014-02-26 00:13:19 +00:00