Commit graph

7889 commits

Author SHA1 Message Date
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
Tom Hughes
2f722fc281 Merge remote-tracking branch 'openstreetmap/pull/1350' 2016-11-09 20:32:54 +00:00
Tom Hughes
2308e69582 Update google logo
Fixes #1364
2016-11-09 16:16:28 +00:00
Tom Hughes
cbff014368 Disable zoom buttons when zoom limit is reached
Fixes #1365
2016-11-09 16:09:32 +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
Tom Hughes
a5a4ab8bcc Expire old oauth nonces 2016-11-07 11:31:58 +00:00
Siebrand Mazeland
f6f00febf5 Localisation updates from https://translatewiki.net. 2016-11-04 21:40:52 +01:00
Siebrand Mazeland
7c78c70456 Localisation updates from https://translatewiki.net. 2016-11-04 12:49:25 +01:00
Tom Hughes
e84f0c710d Reject oauth nonces over a day old 2016-11-03 07:14:19 +00:00
Niklas Laxström
eb21a32ea4 Localisation updates from https://translatewiki.net. 2016-11-03 08:06:35 +01:00
Andy Allan
d80dee4989 Move instance creation to the top of the test methods. 2016-11-01 10:43:38 +00:00
Niklas Laxström
269888802c Localisation updates from https://translatewiki.net. 2016-11-01 08:32:42 +01:00
Tom Hughes
282ff4936c Fix rubocop warnings 2016-10-31 21:24:10 +00:00
Tom Hughes
96b1bff9fb Update bundle 2016-10-31 21:18:28 +00:00
Andy Allan
aa185bf4f8 Replace fixtures with factory for relation_tags 2016-10-31 12:30:57 +01:00
Andy Allan
97d63db369 Replace fixtures with factory for way_tags 2016-10-31 11:49:51 +01:00
Andy Allan
3026af170a Replace fixtures with factory for node_tags 2016-10-30 18:28:01 +01:00
Tom Hughes
fc0aebc1a8 Merge remote-tracking branch 'openstreetmap/pull/1352' 2016-10-30 16:59:20 +00:00
Tom Hughes
ce6368119f Merge remote-tracking branch 'openstreetmap/pull/1351' 2016-10-30 16:57:35 +00:00
Andy Allan
aba28ec9e0 Replace fixtures with a factory for old_relation_tags 2016-10-30 16:32:11 +01:00
Andy Allan
e308da8daf Convert fixtures to factory for old_way_tags 2016-10-30 16:15:23 +01:00
Andy Allan
acb7f44069 Replace fixtures with a factory for old_node_tags
Also includes a slight simplification of the old_node_tags tests.
2016-10-30 15:36:33 +01:00
Andy Allan
596494a590 Replace changeset_tags fixtures with a factory. 2016-10-30 12:45:02 +01:00
Andy Allan
4eeea7e705 Remove the changesets_subscribers fixture.
Since there is no ChangesetsSubscribers model, we can't use a factory.
Instead we create the associations explicitly when needed.
2016-10-30 12:23:23 +01: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
5e86393f72 Use webmock to power the with_http_stubs helper
This involves a small amount of changing the fixtures since we're
using the regexp and not the full url matching powers of webmock.
2016-10-30 10:29:16 +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
6bc488a983 Add webmock to intercept real http connections during tests
Intercepting real http connections also allows running the test
suite without an internet connection.
2016-10-30 10:28:26 +01:00
Andy Allan
a32333ba12 Use stub_any_instance in order to stub find results.
This is a much cleaner approach than before.
2016-10-30 10:22:10 +01:00
Tom Hughes
48eb8eb369 Merge remote-tracking branch 'openstreetmap/pull/1349' 2016-10-29 18:08:31 +01:00
Andy Allan
ea502ac9df Rubocop fix. 2016-10-29 17:32:50 +02:00
Tom Hughes
d478f94239 Merge remote-tracking branch 'openstreetmap/pull/1348' 2016-10-29 16:26:16 +01:00
Andy Allan
4a9aa0a12e Avoid double-escaping diary entry titles
The XML builder takes care of the escaping, and adding h() lead to
double-escaped titles in the RSS feed.
2016-10-29 17:17:56 +02:00
Andy Allan
968447595b Use dc:creator for note RSS feeds
The author tag is reserved for email addresses
2016-10-29 17:14:56 +02:00
Andy Allan
5164c71646 Use dc:creator for diary entry RSS
The author tag is reserved for email addresses, and we already use
dc:creator in other feeds.
2016-10-29 17:10:24 +02:00
Andy Allan
ee2a941d3e Use a full url for the image in the diary rss feed.
Picked up by a validator, see
https://validator.w3.org/feed/docs/error/InvalidFullLink.html
2016-10-29 17:08:21 +02:00
Andy Allan
27ee98cf4c Make the image title match the feed title in diary rss
This is recommended at https://validator.w3.org/feed/docs/warning/ImageTitleDoesntMatch.html
2016-10-29 17:05:30 +02: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
f7b4793c50 Require user_roles fixtures 2016-10-27 12:15:28 +01:00
Tom Hughes
28864d8fec Update mailmap 2016-10-27 11:57:32 +01:00
Tom Hughes
f6695c9079 Merge remote-tracking branch 'openstreetmap/pull/1344' 2016-10-27 11:51:36 +01:00
Mormegil
caac9a9403 Ensure IE/Edge compatibility for routing drag&drop
Use the DataTransfer interface properly, using the `text` format, as
IE/Edge does not support much more. We can JSON-serialize anything
there, even though right now, only a single string would be enough.

Also, IE does not support .setDragImage, so check for support prior
to calling.

Fixes #1343
2016-10-27 12:34:07 +02:00
Tom Hughes
15395bb944 Reset database before running tests 2016-10-26 21:34:38 +01:00
Tom Hughes
2df3605142 Merge remote-tracking branch 'openstreetmap/pull/1339' 2016-10-26 15:54:42 +01:00
Tom Hughes
8920a56133 Merge remote-tracking branch 'openstreetmap/pull/1338' 2016-10-26 15:48:56 +01:00
Tom Hughes
3371ca37f1 Merge remote-tracking branch 'openstreetmap/pull/1337' 2016-10-26 15:41:30 +01:00
Tom Hughes
20aa4ba31b Merge remote-tracking branch 'openstreetmap/pull/1336' 2016-10-26 15:35:18 +01:00