Commit graph

34 commits

Author SHA1 Message Date
Tom Hughes
03cad948e3 Fix new rubocop warnings 2022-03-15 19:24:09 +00:00
Tom Hughes
e4ce1c5f2f Check that the permission is non-zero
Fixes #3241
2021-07-01 16:35:29 +01:00
Tom Hughes
1f136a84a6 Prevent CSRF bypass with login form 2021-02-10 20:39:23 +00:00
Tom Hughes
6f342c7616 Switch oauth integration tests to use new shared helper 2020-05-05 18:04:48 +01:00
Tom Hughes
473da378b7 Remove fallback to hostip.info
We haven't used hostip.info in production for years, except
for when we did so by accident, leading to a two hour partial
outage when it went down.
2020-01-06 19:14:12 +00:00
Tom Hughes
03408b6294 Update get/post etc to remove use of deprecated syntax 2017-06-27 08:26:44 +01:00
Tom Hughes
07673278f1 Remove deprecated get_via_direct and post_via_redirect methods 2017-06-06 00:03:39 +01:00
Andy Allan
5370f9c6a7 Refactor the oauth integration test to avoid using user fixtures. 2017-03-15 16:13:04 +00:00
Tom Hughes
0814b4096c Merge remote-tracking branch 'openstreetmap/pull/1347' into master 2017-02-05 16:02:20 +00:00
Andy Allan
8a6e8ae128 Convert client applications fixtures into a factory
Closes #1415
2017-01-26 18:03:51 +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
Tom Hughes
8eca904388 Rename stub_signup_requests to stub_hostip_requests 2016-11-09 20:36:09 +00:00
Tom Hughes
5c9f1310b0 Convert more 'setup do' to 'def setup' for consistency 2016-11-09 20:33:55 +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
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
Tom Hughes
e17b89e89f Fix rubocop warnings 2016-10-20 22:35:51 +01:00
Tom Hughes
8fe1899596 Fix rubocop warnings 2016-01-19 09:51:24 +00:00
Tom Hughes
41eb7a1407 Test rendering of OAuth authorization page 2015-08-19 08:35:41 +01:00
Tom Hughes
7fef0353f2 More test work 2015-03-08 00:48:13 +00:00
Tom Hughes
6ce635d5d3 Reduce duplication in the oauth tests 2015-03-07 11:17:17 +00:00
Tom Hughes
21d60e359a Tests! 2015-03-04 21:49:43 +00:00
Tom Hughes
4bb9f96133 Set fixture class when using gpx_files 2015-02-25 01:06:55 +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
98184dfb9c Reorganise tests to match modern rails test layout 2014-02-26 00:13:19 +00:00
Tom Hughes
a9f4549327 Tidy up the OAuth authorization screens
Make sure all messages are translatable, separate errors from
user initiated denial of authorization.
2013-11-30 12:25:22 +00:00
Tom Hughes
b7e795e1e1 Set hostname for signed requests correctly 2013-09-21 12:03:53 +01:00
Tom Hughes
75795125ad Remove deprecated assert_blank and assert_present from tests 2013-09-21 12:03:53 +01:00
Tom Hughes
d8399d3e18 IntegrationTest is now in ActionDispatch not ActionController 2013-09-21 11:35:46 +01:00
Tom Hughes
9813d9f1e4 Get all the tests passing under ruby 1.9 2012-05-27 13:51:25 +01:00
Tom Hughes
d9dedf403d Test that revoking OAuth tokens works 2012-04-24 21:28:20 +01:00
Tom Hughes
c00dd8c712 Add some OAuth tests 2011-11-19 17:38:06 +00:00