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
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
4607ac2d30
More work on user tests
2015-03-09 00:58:38 +00:00
Tom Hughes
f8de0c1811
Ever more tests...
2015-03-08 16:47:35 +00:00
Tom Hughes
15b550182c
Yet more tests...
2015-03-02 21:20:01 +00:00
Tom Hughes
e434cb154c
Convert OpenID authentication to generic third party authentication
2015-02-25 01:07:23 +00:00
Tom Hughes
8568c93703
More fixes to fixture loading in tests
2015-02-23 22:34:04 +00:00
Tom Hughes
711e1db5fe
Load extra fixtures need for user controller tests
2015-02-22 21:54:22 +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
6af8f8a9e3
Fix invalid CSS selectors
2015-01-10 12:41:09 +00:00
Tom Hughes
5bbe1c4aee
Improve testing of emails
...
Make sure we test that everything which should send email does
and that we clear the pending emails afterwards.
2014-07-04 19:21:57 +01:00
Tom Hughes
98184dfb9c
Reorganise tests to match modern rails test layout
2014-02-26 00:13:19 +00:00