Commit graph

251 commits

Author SHA1 Message Date
Tom Hughes
bc630bca87 Rename friends_with to follows 2025-01-17 22:58:35 +00:00
Anton Khorev
3eccf65d8c Merge branch 'pull/5261' 2025-01-17 04:01:22 +03:00
Nenad Vujicic
11e0444f36 Added unit tests for new Note methods
Added unit tests for new Note methods and updated system tests to use description instead of first comment's body.
2025-01-15 12:12:56 +01:00
nertc
be11f2075e Refactor friendships controller and model 2025-01-14 11:33:56 +04:00
Tom Hughes
17bc0853a0 Drop support for OAuth 1 2024-09-01 03:43:02 +03:00
Anton Khorev
a05de1e0a7 Use assert_not_predicate instead of assert_not next to assert_predicate 2024-07-25 04:56:57 +03:00
Tom Hughes
61c5011813 Update tests to avoid triggering changeset size limits 2024-06-19 00:46:35 +01:00
Anton Khorev
349200fb0a Rename update element consistency check 2024-03-30 10:57:39 +03:00
Anton Khorev
09f6b83486 Refactor update element consistency check 2024-03-30 10:57:27 +03:00
Anton Khorev
f50ca826aa Refactor create element consistency check 2024-03-30 10:09:55 +03:00
Ishmeet Singh
6524541975 Test validation of title and description presence for redactions 2024-03-11 09:27:30 +00:00
Tom Hughes
29cc21c599 Drop user tokens table 2024-02-28 21:02:54 +00:00
Tom Hughes
3360f91733 Require display names to have a minimum unicode width of 3 columns
Fixes #4538
2024-02-25 13:21:03 +00:00
Andy Allan
a1a6c577e8
Merge pull request #4534 from tomhughes/list-headers
Add standard List-XXX headers to some notification mails
2024-02-25 11:36:05 +01:00
Tom Hughes
741ed58838 Add a limit on the number of points in a GPS trace 2024-02-25 09:50:02 +00:00
Tom Hughes
8e21e4e801 Move mechanics of changeset subscriptions into the model 2024-02-25 09:48:11 +00:00
Tom Hughes
b9c5df4dad Use with_settings for temporary changes to settings 2024-02-01 18:37:28 +00:00
Andy Allan
7406ae5dcc
Merge pull request #4218 from AntonKhorev/no-user-id-renames
Disallow username changes to user_n if n isn't their id
2024-01-18 10:47:17 +00:00
Andy Allan
0a21080192 Move change detection to validation declaration
This aligns with other validations. Also add test to ensure unchanged
display_names are treated as valid.
2024-01-18 10:33:56 +00:00
Anton Khorev
2c342adc0d Disallow username changes to user_n if n isn't their id 2024-01-18 10:33:56 +00:00
Andy Allan
d5efa4c357
Merge pull request #4405 from tomhughes/normalize-display-name
Require user names to be unique after unicode normalisation
2024-01-17 16:24:09 +00:00
Anton Khorev
6272b041c6 Add :closed trait to note factory 2024-01-05 12:34:27 +03:00
Anton Khorev
3a8a997fb8 Use assert_not_predicate in tests that have assert_predicate 2024-01-03 16:01:17 +03:00
Anton Khorev
6427f68ea7 Don't show native language name if it's the same as English name 2024-01-02 09:09:33 +03:00
Gregory Igelmund
d0ec5d1437 Add tests & factories for UserMute feature 2023-12-19 12:57:47 -05:00
Tom Hughes
d8e5b84e5b Add test for no_trace_download ACLs 2023-12-19 12:03:08 +00:00
Tom Hughes
f28bad7229 Add test for no_note_comment ACLs 2023-12-19 12:03:08 +00:00
Tom Hughes
9a6a6fab73 Make allow_account_creation work the same as other ACLs 2023-12-19 12:03:08 +00:00
Milan Cvetkovic
a4c23cd89f Implement allow list for account creation 2023-12-17 07:55:43 +00:00
Tom Hughes
c12f8959dd Require user names to be unique after unicode normalisation
As with the previous checks on case sensitivity this only affects
new users, and changes to names of existing users.
2023-12-13 22:27:36 +00:00
Anton Khorev
a8aaf62e62 Add earliest allowed deletion time to user model 2023-11-22 17:02:48 +03:00
Andy Allan
1700c23dd1 Prefer find_by() instead of where().first
These are very similar, differing only if we would expect multiple
results and the sorting is important. However, in all our cases
we're only expecting one result to be returned, and so find_by is
easier to read.
2023-10-04 17:53:58 +01:00
Andy Allan
b595b87c48 Use trace instead of gpx_id in queries
This makes the queries easier to read.
2023-08-30 17:08:46 +01:00
Tom Hughes
6982903ae7 Fix predicate method names in the user model 2023-08-15 18:53:14 +01:00
Tom Hughes
e5406c6836 Make test names clearer 2022-12-29 16:52:19 +00:00
Andy Allan
0925035a3e Add tests to ensure tokens are revoked
This ensures that tokens are revoked or invalidated when a user
is soft destroyed.
2022-12-28 15:25:57 +00:00
Andy Allan
415ac577f3 Remove some old debugging comments 2022-12-21 12:05:15 +00:00
Tom Hughes
9cd96bd452 Fix new rubocop warnings 2022-09-09 22:45:58 +01:00
Anton Khorev
b54c03389b Strip leading/trailing whitespace from comma-separated trace tags 2022-07-19 13:47:28 +03:00
Tom Hughes
a3a228862c Add validation for relation member roles
Fixes #3563
2022-06-09 19:21:08 +01:00
Harry Wood
3ca8b63643 Put issue comments through kramdown formatter
On issue comments (which only admins can create or see), put the `body` text through kramdown formatting.
2022-05-06 13:36:59 +01:00
Harry Wood
e204e1d178 Add some basic testing of issue_comment model
A factory and a basic test of validation for the issue_comment model, similar to what we have for diary_comment.
2022-05-06 12:38:17 +01:00
Harry Wood
9401e451d1 Format report text with kramdown
Pass the text of reports ('details' field) through the RichText formatter to give us kramdown formatting support.
2022-04-29 01:31:39 +01:00
Andy Allan
5c2cb9e96f Use factories for tag uniqueness tests 2022-03-30 17:15:11 +01:00
Andy Allan
034db6820f Simplify changeset tag tests by using factories
This saves lots of boilerplate in creating a valid test object
2022-03-30 17:03:04 +01:00
Andy Allan
374518f58a Rework 'empty' tag tests
These tests were checking that the parent object was set, but this
was not obvious from the way that the tests were named and constructed.

This refactoring makes it clearer what is being checked.
2022-03-30 16:37:16 +01:00
Tom Hughes
03cad948e3 Fix new rubocop warnings 2022-03-15 19:24:09 +00:00
Andy Allan
d6f8302eae
Merge pull request #3491 from tomhughes/legacy-trace
Remove support for legacy trace files
2022-03-09 17:10:40 +00:00
Tom Hughes
cbcc7dc49f Fix some rubocop Naming/PredicateName warnings 2022-03-03 22:47:55 +00:00
Tom Hughes
92b122759f Remove support for legacy trace files 2022-03-03 19:47:40 +00:00