Andy Allan
3ec67ea2d3
Rename user_controller to users_controller
2018-10-03 15:31:10 +02:00
Tom Hughes
b4d90ec7f4
Test that friends are shown correctly on the user profile
...
Fixes #1992
2018-09-12 18:03:12 +01:00
Tom Hughes
297b0a0e16
Merge remote-tracking branch 'upstream/pull/1987'
2018-09-10 19:09:31 +01:00
Tom Hughes
276599d34f
Merge remote-tracking branch 'upstream/pull/1986'
2018-09-10 19:01:28 +01:00
Wil
a182820139
Resolve 96 Rubocop Lint/AmbiguousRegexpLiteral conflicts
2018-09-10 11:28:16 +08:00
Andy Allan
4dd4831c0a
Just pass the user object, rather than the display_name, to the user_path helper
2018-09-10 10:54:29 +08:00
Andy Allan
a3606e00b4
Rename user#list to user#index
2018-09-10 10:03:34 +08:00
Andy Allan
19c26e70a3
Rename user#view to user#show
2018-09-05 14:21:01 +08:00
Tom Hughes
b4106383d9
Add /api/0.6/users to fetch multiple users
...
Fixes #1921
2018-07-09 22:26:55 +01:00
Tom Hughes
cb3c4ec09b
Update for rubocop 0.54.0
2018-05-17 19:39:25 +01:00
Tom Hughes
8dae890a76
Fix rubocop warnings
2017-10-05 19:18:38 +01:00
Tom Hughes
a70898be6d
Make sure we show errors correctly when resetting a password
2017-08-11 17:45:57 +01:00
Tom Hughes
85b0098b1c
Make sure the account form is POSTed
...
Fixes #1601
2017-08-02 15:32:13 +01:00
Tom Hughes
f258af223b
Fix user settings form
...
Fixes #1601
2017-08-01 19:25:07 +01:00
Andy Allan
6fe5d42100
Standardise on basic_authorization without the parentheses
2017-07-12 14:36:17 +01:00
Andy Allan
cbf71f04c2
Hide contributor terms details, unless the user hasn't agreed
...
It's no longer important to show when users agreed to the contributor terms.
For users that haven't agreed, we still show their status on their profile.
Logic was also re-written to avoid lots of `if not` things, and tests added.
2017-07-05 12:39:52 +01:00
Tom Hughes
3893fd72a9
Fix some tests for changes in rails 5
2017-06-27 08:26:44 +01:00
Tom Hughes
03408b6294
Update get/post etc to remove use of deprecated syntax
2017-06-27 08:26:44 +01:00
Tom Hughes
ff97501ed0
Remove all use of the :text option to render
...
It doesn't actually do what it says, as it sets the content type
to text/html not text/plain so is just confusing and as a result
has been deprecated in newer rails versions.
2017-06-02 19:12:05 +01:00
Andy Allan
162949817d
Rubocop fixes.
2017-06-01 10:58:34 +01:00
Andy Allan
5246ebefa9
Update the user list pagination test to avoid counting users from fixtures.
2017-05-31 18:43:28 +01:00
Andy Allan
cea6f9c4cf
Refactor the user list test to use factory-built users and explicit assertions.
2017-05-31 18:40:20 +01:00
Andy Allan
8d2d6e1a52
Use a pending user for testing password resets.
2017-03-15 14:22:04 +00:00
Andy Allan
3d8dc64b9c
Use users factory for user_controller tests.
2017-03-15 11:56:36 +00:00
Andy Allan
17ff182c96
Build pending users via factory
2017-03-13 10:20:06 +00:00
Andy Allan
a3618d2b5f
User factory associations for all factories.
2017-02-22 18:51:45 +00:00
Andy Allan
7d9d496da2
Pass the user object, rather than the id, for sessions.
...
This simplifies the code slightly.
2017-02-22 09:57:18 +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
69b967c9ff
Add support for Wikimedia authentication
...
Closes #1146
2016-12-20 22:32:25 +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
8eca904388
Rename stub_signup_requests to stub_hostip_requests
2016-11-09 20:36:09 +00:00
Andy Allan
f6ba15b1a3
Use 'def setup' instead of 'setup do', for consistency
2016-11-09 16:05:28 +00:00
Andy Allan
7cc1cc618d
Extract the hostip.info stubbing into a common method.
...
There doesn't appear to be any before(:suite) equivalent for Minitest
so this is the least-surprising way to do this.
2016-11-09 16:00:47 +00:00
Andy Allan
4d73706ff3
Refactor the gravatar email changes to use webmock stubbing
...
The main reason for doing this is to make the tests easier to read,
rather than having to look up both the gravatar fixture, and then
correlate that with the users fixture. Putting the expected response
code in the tests is much more explicit.
2016-10-30 11:06:35 +01:00
Andy Allan
90175c3bdb
Stub out requests to gravatar.com during tests.
2016-10-30 10:28:58 +01:00
Andy Allan
d3d6e9902c
Stub out requests to hostip.info during tests
...
These are detecting the correct locale for showing terms during signup
2016-10-30 10:28:46 +01: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
Andy Allan
a280f72bee
Replace messages fixtures with a factory.
2016-10-26 11:41:18 +01:00
Tom Hughes
4627b79885
Merge remote-tracking branch 'openstreetmap/pull/1331'
2016-10-19 11:52:17 +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
23c3168c55
Replace user_blocks fixture with a factory.
...
Traits are used here to make the tests easier to read, and the
different traits can be combined where necessary.
2016-10-19 10:57:40 +01:00
Andy Allan
bfe760a4b0
Replace friends fixture with a factory
2016-10-05 13:18:45 +01:00
Simon Poole
0837205d02
Merge message when Gravatar status has changed with email confirmation
...
Merge message when Gravatar status has changed with email confirmation and make messages more verbose and friendly.
2016-08-19 08:59:40 +02:00
Simon Poole
90b7101cc3
Add tests for change of gravatar use depending on email
2016-08-16 22:09:11 +02:00
Simon Poole
05cd781b25
Remove default enabling of gravatar, check on initial confirmation of e-mail address and on any changes afterward if
...
a gravatar exists and enable then if the user hasn't uploaded a picture.
2016-08-16 21:42:02 +02:00
Tom Hughes
c70a1fe933
Add support for GitHub authentication
2016-07-14 09:40:45 +01:00
Tom Hughes
f0fa701563
Treeat user as logged in after a password reset
...
Fixes #1160
2016-02-26 16:30:32 +00:00
Tom Hughes
629ae62b73
Require a valid session token to resend a confirmation
...
Make user#confirm_resend require a valid token in the session
that matches the requested user, and ensure trying to login as
an unconfirmed user sets such a token.
Fixes #1010
2015-07-20 21:32:34 +01:00
Tom Hughes
2b2264ddab
Add support for Windows Live authentication
2015-05-19 14:04:09 +01:00