Tom Hughes
e8af4b85bf
Fix new rubocop warnings
2023-09-26 18:42:57 +01:00
Tom Hughes
5d67fa3908
Fix some Naming/AccessorMethodName rubocop warnings
2022-03-08 19:10:05 +00:00
Andy Allan
dfcecb0118
Remove the ObjectMetadata concern, since it's only used in tests now
2021-09-15 17:05:50 +01:00
Andy Allan
37b03e47c6
Fix various code comments
...
These were found as part of #3233
2021-07-21 11:24:23 +01:00
Tom Hughes
f064a18a16
Add tests for OAuth2
2021-05-18 12:05:33 +01:00
Tom Hughes
70d7d8d850
Fix some ruby 3 compatibility issues
2021-04-22 19:20:25 +01:00
Tom Hughes
1f136a84a6
Prevent CSRF bypass with login form
2021-02-10 20:39:23 +00:00
Tom Hughes
c9a4c78146
Make coverage testing work with parallel tests
...
https://github.com/simplecov-ruby/simplecov/issues/718#issuecomment-538201587
2020-12-18 22:39:23 +00:00
Tom Hughes
4a9f8a5e69
Move coveralls submission to actions workflow
2020-12-10 00:11:50 +00:00
Tom Hughes
ea59d95f4a
Fix some new rubocop warnings
2020-08-06 22:27:30 +01:00
Tom Hughes
2d3972249c
Fix some rubocop todos
2020-08-02 19:38:58 +01:00
Andy Allan
7485b49a3a
Remove unused test helper
2020-05-13 18:15:07 +02:00
Tom Hughes
dbf0147d21
Remove unused function
2020-05-05 19:20:21 +01:00
Tom Hughes
f898cecb5c
Refactor map_controller_test
2020-05-05 19:19:43 +01:00
Tom Hughes
c18e39cc05
Add helper methods for making OAuth signed requests
2020-05-05 18:04:48 +01:00
Andy Allan
2e3522a2f6
Refactor changesets_controller_test
...
Introduces some route names which need to be unique from the non-api versions
2020-04-29 17:42:08 +02:00
Andy Allan
1aa5a54419
Refactor site controller tests to inherit from ActionDispatch::IntegrationTest
...
This is the modern way of writing controller tests, since it uses the
rails middleware (among other things) and leads to more realistic tests.
Refs #2563
2020-04-22 11:09:13 +02:00
Andy Allan
6bd6cbd203
Enable parallel tests
2020-03-18 15:04:18 +01:00
Andy Allan
73c95847a6
Merge pull request #2485 from mmd-osm/patch/json2
...
JSON output nodes, ways, relations, map
2020-02-26 15:55:48 +01:00
mmd-osm
03ca0b2c69
Added Accept header unit tests
2020-01-12 17:46:11 +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
4ee60c0f8f
Make all translation lookup errors throw exceptions in test mode
2019-12-16 21:54:11 +00:00
Andy Allan
bc850d1d37
Move Relation.to_xml and to_xml_node out of the model and into tests
2019-11-20 15:45:28 +01:00
Andy Allan
2b1bac1279
Move Way.to_xml and to_xml_node out of the model and into tests
...
This code is only used in the tests. Refs #2433
2019-11-20 15:31:47 +01:00
Andy Allan
4e7c0c3008
Move Node.to_xml and to_xml_node out of model and into tests
...
This code is only used in the tests for creating 'fixture' payloads,
so it shouldn't be kept in the models.
2019-11-13 17:01:40 +01:00
Andy Allan
2c21dd4906
Silence the simplecov output message
...
It's very rare for the information in this message to be useful or
actionable when running the tests, so it's best to silence the message.
2019-03-06 09:54:05 +01:00
Andy Allan
d43315f738
Output both the local simplecov html and the coveralls report
...
Fixes #2066
2019-02-06 18:15:46 +01:00
Tom Hughes
6f2f9221ef
Fix tests for rails 5.2.1 compatibility
...
Rails 5.2.1 has changed how the request body is handled
internally for a test which means we can no longer cheat
by stashing it in the request environment and must instead
pass it properly to the request method.
2018-11-15 00:46:53 +00:00
Andy Allan
b54362d458
Use deliver_later for all email sending
2018-10-31 16:38:12 +01:00
Tom Hughes
5ff822083d
Block non-localhost requests for all tests
...
Only blocking them for the system tests didn't actually
work anyway as the setting is global so would apply to all
tests after the first system test.
2018-07-10 18:59:15 +01:00
Tom Hughes
d66b4b3d2f
Fix stubbing of hostip requests
2018-07-09 20:15:42 +01:00
Tom Hughes
98de681e47
Update to rails 5.2.0
2018-06-19 00:16:24 +01:00
Andy Allan
0a86a1ea8d
Fix handling of title when replying to diary entries
2018-04-11 14:03:17 +08:00
Tom Hughes
1f2ac59d1d
Fix new rubocop warnings
2018-03-26 19:00:03 +01:00
Tom Hughes
a83030dab7
Fix new rubocop warnings
2018-01-22 18:55:45 +00:00
Tom Hughes
b2fa947502
Replace factory_girl with factory_bot
2017-10-29 19:29:30 +00:00
Andy Allan
c12459dead
Remove test fixtures.
2017-06-01 11:01:17 +01:00
Andy Allan
5d0ea28796
Remove the api_fixtures helper
...
This is no longer required, as the tests no longer use fixtures.
2017-06-01 10:59:48 +01:00
Tom Hughes
0814b4096c
Merge remote-tracking branch 'openstreetmap/pull/1347' into master
2017-02-05 16:02:20 +00:00
Tom Hughes
c57d2b29fc
Merge remote-tracking branch 'openstreetmap/pull/1401'
2017-02-05 13:50:07 +00:00
Herve Saint-Amand
74e28f8bd0
Use each_with_object and make the code pithier
2017-01-28 23:27:04 +00:00
Andy Allan
8a6e8ae128
Convert client applications fixtures into a factory
...
Closes #1415
2017-01-26 18:03:51 +00:00
Herve Saint-Amand
e59d6c567b
Rubocop finds 'return' statements redundant
2017-01-11 23:26:56 +00:00
Herve Saint-Amand
0449024ca0
Modify tests to search only text parts
...
The tests assumed that every part in the multipart emails that we send were either plain text or HTML. Now we have image attachments, against whose contents the tests were still trying to match regexes. The tests have been modified to only run regexes on the text parts of the mails.
2017-01-11 23:17:24 +00:00
Tom Hughes
970e1a99d7
Merge remote-tracking branch 'openstreetmap/pull/1367'
2016-12-18 16:29:33 +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
2f722fc281
Merge remote-tracking branch 'openstreetmap/pull/1350'
2016-11-09 20:32:54 +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
aa185bf4f8
Replace fixtures with factory for relation_tags
2016-10-31 12:30:57 +01:00