Andy Allan
a219df24ca
Ensure that urls are only valid if the entire string is a url
...
This replaces our homegrown regexps (that didn't quite work) with
ruby built-in regexps, and uses the termination anchor to ensure
that the entire string, not just the first part, is validated.
2020-04-01 17:53:37 +02:00
Andy Allan
1cb0767e3d
Copy trace fixture files, rather than symlinking
...
Since we are using tmpdirs in order to enable parallel testing, we
can go the full hog and drop the fakefs too and just copy all the
files directly into the tmpdir. If a test makes changes (e.g.
changing the icon file during an import) the copy in the tmpdir is
thrown away at the end of the test anyway.
2020-03-18 15:35:55 +01:00
Andy Allan
979a474c68
Use unique test directories for each trace test
...
This allows tests to be run in parallel, since it avoids deleting
some of the symlinks that other tests expect to be there.
2020-03-18 15:04:18 +01:00
Tom Hughes
57f5b7840e
Fix rubocop warnings
2019-12-04 19:31:53 +00:00
Andy Allan
ae5c364e97
Move the format tests to test the output from the controller
2019-11-13 15:21:41 +01:00
Tom Hughes
135ec35a91
Fix numericality validation to use correct integer only constraint
...
Fixes #2355
2019-08-22 12:14:06 +01:00
Tom Hughes
18f5f1d499
Explicitly require gpx in the trace model tests
...
If we don't do this and no other test manages to trigger an
autoload before we run then we might try and autoload it inside
a MockFS block which will fail.
2019-08-14 19:10:15 +01:00
Tom Hughes
91a37235ac
Remove support for old style user images
2019-07-16 22:33:26 +01:00
Tom Hughes
d2d5d48f29
Allow signups to be blocked by MX host
2019-06-23 11:21:03 +01:00
Andy Allan
2169c503ef
Rename user.friend_users to user.friends
...
This is possible now since we've renamed Friend to Friendship
2019-06-19 16:51:35 +02:00
Andy Allan
1cf8fec58d
Rename Friend model to Friendship
...
This better describes what the model represents, which is the relationship
between the two users.
2019-06-19 16:39:25 +02:00
Tom Hughes
26cbdcf71a
Fix importing of GPX traces with a leading byte order marker
...
Fixes #2258
2019-06-14 19:01:53 +01:00
Tom Hughes
b5d903c603
Test import of various trace formats
...
Fixes #2254
2019-06-11 19:52:51 +01:00
Tom Hughes
9f57f60b87
Fix new rubocop warnings
2019-04-23 09:33:34 +01:00
Tom Hughes
dcfe326f65
Merge remote-tracking branch 'upstream/pull/2175'
2019-03-26 19:14:04 +00:00
Andy Allan
400db58036
Use activerecord-import for bulk importing tracepoint records
...
Non-rigourous testing shows a significant speedup, even on ssds.
2019-03-20 10:35:40 +01:00
Andy Allan
d102c9aaf4
Move all settings to settings.yml
...
We leave the STATUS setting alone, since it's required before rails
boots. The test-specific settings now live in config/settings/test.yml
2019-03-13 18:06:23 +01:00
Andy Allan
1ca77d6dda
Rubocop fixes for ruby 2.5
2019-03-13 10:33:33 +01:00
Tom Hughes
f7694a94c1
Update tests for changes in FactoryBot 5.x
2019-02-07 20:21:40 +00:00
Andy Allan
65e8bbd5f8
Remove unnecessary requires from tests
2019-02-06 11:44:34 +01:00
Andy Allan
d02e4ad461
Write some basic functionality tests for trace.import
2019-01-23 16:47:54 +01:00
Andy Allan
d70529f12b
Remove unnecessary include from redaction model test
2018-11-07 16:48:48 +01:00
J Guthrie
1e57189366
Added tests for validators
2018-11-05 16:23:30 +00:00
J Guthrie
6cde8c9b0c
Changed User model to not allow nil display_name (w/ tests)
2018-11-05 15:40:37 +00:00
Simon Poole
07ffb4c3f6
Calculate bounding box when deleting relations
...
Closes #2030
Fixes #2020
2018-10-21 19:32:12 +01:00
Xuyang Jia
d0e45c7c8e
Fix any_relations always being false
...
Closes #1976
2018-09-22 17:46:00 +01:00
Wil
a182820139
Resolve 96 Rubocop Lint/AmbiguousRegexpLiteral conflicts
2018-09-10 11:28:16 +08:00
Tom Hughes
f7a35c5895
Fix new rubocop warnings
2018-06-18 09:00:49 +01:00
Tom Hughes
e5604ce98e
Assign vandalism reports for users to moderators
2018-06-17 11:14:19 +01:00
Tom Hughes
518cf69b34
Improve model tests for issues
2018-06-10 17:59:15 +01:00
Tom Hughes
d3700e6201
Merge branch 'master' into next
2018-06-10 17:02:12 +01:00
Tom Hughes
cb3c4ec09b
Update for rubocop 0.54.0
2018-05-17 19:39:25 +01:00
Andy Allan
46c183ffeb
Add more tests
2018-03-28 11:05:47 +08:00
Andy Allan
3006ce9713
Remove reporting of changesets
2018-02-28 14:39:40 +08:00
Andy Allan
63992d83bd
Store the report category.
2017-12-13 16:02:55 +00:00
Andy Allan
0df788d742
Rename 'issue_type' to 'assigned_role', set defaults in the model and test.
2017-12-06 17:15:11 +00:00
Andy Allan
9f65820336
Rubocop fixes.
2017-11-29 16:48:01 +00:00
Andy Allan
effb1b7f41
Merge branch 'master' into moderation
2017-11-29 12:18:39 +00:00
Tom Hughes
b6b9d543ac
Fix rubocop warnings
2017-10-29 19:43:02 +00:00
Tom Hughes
8dae890a76
Fix rubocop warnings
2017-10-05 19:18:38 +01:00
Andy Allan
c00c515d9d
Ensure report details are not blank.
2017-09-06 18:17:54 +01:00
Andy Allan
506c0b5f0d
Set the reported_user in a callback
...
This avoids passing around the reported_user via forms. There was no
validation anywhere that the reported_user corresponded to the object
being reported. This approach removes those worries too.
2017-07-12 13:36:48 +01:00
Andy Allan
dbd88d893f
Merge branch 'master' into moderation
2017-07-12 10:16:11 +01:00
Andy Allan
396f2e28dd
Rework coordinates to avoid scientific formatting of small numbers. Fixes #1509
2017-06-23 14:03:57 +01:00
Tom Hughes
b00b9ce626
Remove arguments from assert_nothing_raised
...
It has never done anything with the argument and rails 5.0 warns
that rails 5.1 will remove the argument.
2017-06-02 16:33:34 +01:00
Tom Hughes
5b33f3f8e3
Fix rubocop warnings
2017-06-02 00:08:30 +01:00
Andy Allan
86822ea225
Remove remaining references to fixtures.
2017-06-01 11:00:50 +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
Andy Allan
aacc4bbc44
Refactor changeset tags model test to remove dependency on fixtures.
2017-05-31 16:49:17 +01:00
Andy Allan
e9fa94bce2
Refactor remaining relation model tests to use factories.
2017-05-31 14:59:11 +01:00