Commit graph

131 commits

Author SHA1 Message Date
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
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
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
Tom Hughes
f7b4793c50 Require user_roles fixtures 2016-10-27 12:15:28 +01:00
Tom Hughes
e17b89e89f Fix rubocop warnings 2016-10-20 22:35:51 +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
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
Andy Allan
d26f4074fa Remove unneccessary fixture requirement. 2016-09-14 16:23:47 +01:00
Tom Hughes
c70a1fe933 Add support for GitHub authentication 2016-07-14 09:40:45 +01:00
Tom Hughes
480c17be58 Preserve username and "remember me" when login fails
Fixes #1159
2016-02-26 15:32:40 +00:00
Tom Hughes
8fe1899596 Fix rubocop warnings 2016-01-19 09:51:24 +00:00
Tom Hughes
2ef6a960d1 Update bundle 2016-01-19 09:51:23 +00:00
Tom Hughes
1aff968589 Add some tests for the locale library 2016-01-07 18:45:18 +00: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
67f3658431 Preserve URL fragments through external authentication
Fixes #1102
2015-12-12 16:08:09 +00:00
Tom Hughes
41eb7a1407 Test rendering of OAuth authorization page 2015-08-19 08:35:41 +01:00
Tom Hughes
c9d35839be Fix new rubocopy warnings 2015-08-18 20:57:14 +01:00
Tom Hughes
098d1fc235 Allow customer URL schemas for OAuth callback URLs
Fixes #1019
2015-07-28 12:13:18 +01:00
Tom Hughes
e07890a2ad Remove bogus mock data from facebook and windowslive tests 2015-06-08 16:27:04 +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
7ed50894e2 Load user_blocks fixtures for login test 2015-04-14 10:07:38 +01:00
Tom Hughes
2af0840ff3 Fix style issues found by new rubocop version 2015-04-14 09:38:24 +01:00
Tom Hughes
4607ac2d30 More work on user tests 2015-03-09 00:58:38 +00:00
Tom Hughes
9f263dd9c3 Reset the locale after tests that may change it 2015-03-09 00:15:05 +00:00
Tom Hughes
23f568cf3a A few more edge cases 2015-03-08 23:02:04 +00:00
Tom Hughes
f8de0c1811 Ever more tests... 2015-03-08 16:47:35 +00: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
e434cb154c Convert OpenID authentication to generic third party authentication 2015-02-25 01:07:23 +00:00
Tom Hughes
eaf4b32a7f Rework OpenID tests for new flows using OmniAuth mocking 2015-02-25 01:07:23 +00:00
Tom Hughes
4bb9f96133 Set fixture class when using gpx_files 2015-02-25 01:06:55 +00:00
Tom Hughes
a6b84a0294 Fix more rubocop style issues 2015-02-24 23:12:02 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
baf10cd392 Fix rubocop lint issues 2015-02-20 08:56:16 +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
dc5c3d6eea Fix login tests to check whether logins succeed/fail as expected 2015-01-10 17:41:00 +00:00
Tom Hughes
84c802d1a9 Use correct URL 2015-01-10 17:40:55 +00:00
Łukasz Gurdek
14ac1babc2 Changeset discussions
Add support for commenting on changesets with RSS feeds and email
notification of comments to other commenters and people that have
chosen to subscribe to a changeset.
2014-10-23 21:24:51 +01:00
Tom Hughes
c9e9ef1a89 Rewrite layer parameters in shortlinks correctly
Fixes #762
2014-06-17 21:15:36 +01:00
Tom Hughes
c8a23f07db Fix typo 2014-05-24 17:34:19 +01:00
Tom Hughes
98184dfb9c Reorganise tests to match modern rails test layout 2014-02-26 00:13:19 +00:00
Tom Hughes
933b091330 Highlight erroneous fields by adding a class to them
The default rails scheme for highlighting errors is to wrap the
field in a div, but that changes the structure of the page and can
change the meaning of CSS rules applied to the fields.

As an alternative we now apply a class to the fields, and use that
in the CSS to apply a highlight.
2014-01-15 21:41:16 +00:00