nertc
be11f2075e
Refactor friendships controller and model
2025-01-14 11:33:56 +04:00
Anton Khorev
2347906725
Send notifications to note subscribers instead of commenters
2024-11-08 11:40:55 +03:00
Tom Hughes
17bc0853a0
Drop support for OAuth 1
2024-09-01 03:43:02 +03:00
Anton Khorev
11a7bf7e0e
Remove duration controls for blocks that can only be revoked by editing
2024-08-22 14:01:54 +03:00
Anton Khorev
cff4c63713
Add deactivates_at date to user blocks
...
Block deactivation dates that take needs_view-block views into account were derived using updated_at. This was possible because inactive blocks couldn't be edited and their updated_at date wouldn't change. With editing of inactive blocks enabled deactivation date needs to be saved explicitly.
2024-08-19 14:33:20 +03:00
Tom Hughes
1a7d68ccbc
Convert tests using OAuth 1 tokens to use OAuth 2 tokens
2024-07-25 16:55:47 +01:00
Tom Hughes
61c5011813
Update tests to avoid triggering changeset size limits
2024-06-19 00:46:35 +01:00
Tom Hughes
a34fa95af4
Fix rubocop warning
2024-04-21 19:07:16 +01:00
Tom Hughes
43db18ae91
Merge remote-tracking branch 'upstream/pull/4708'
2024-04-21 18:54:16 +01:00
Josh Thompson
130a2ed7c1
calculate hash once per test run, per thread
2024-04-18 18:07:03 -06:00
Josh Thompson
4cac6b0354
unburden call for User fabrication
...
Speeds up tests rather nicely, derived via trial and error
reasonably confident that this is nice. overheard it mentioned by Vladimir
Dementyev in a Codewithjason podcast, so when my intuition already led me
to the user factory, I figured 'on principle/correctness, I should at least
look at what happens if we sidestep the native hashing library, because it's
something i was already curious about.
2024-04-17 14:03:52 -06:00
Anton Khorev
3a05667d45
Make factory-created revoked blocks inactive
2024-03-21 06:11:24 +03:00
Tom Hughes
085d8ebe6a
Make the user factory generate valid passwords
2024-02-27 20:52:18 +00:00
Anton Khorev
1efbdb2d6c
Add closed_by attribute to :closed note factory trait
2024-01-05 13:04:06 +03:00
Anton Khorev
6272b041c6
Add :closed trait to note factory
2024-01-05 12:34:27 +03:00
Gregory Igelmund
d0ec5d1437
Add tests & factories for UserMute feature
2023-12-19 12:57:47 -05:00
Tom Hughes
c6bb4a5f4e
Add importer role that can be associated with higher rate limits
2023-11-02 08:58:12 +00:00
Tom Hughes
ee3f045495
Assign proper sequence numbers to relation members in tests
2023-10-26 18:22:41 +01:00
Andy Allan
cb4f99fef2
Use implicit style for associations with factory overrides
...
This matches our usage of implicit style for associations generally,
e.g. `user`.
2023-09-06 10:20:23 +01:00
Tom Hughes
75bde83a13
Improve testing of changeset comment rate limits
2023-08-30 19:11:08 +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
Tom Hughes
b5f06e06c1
Fix rubocop Rails/TimeZone warnings
2022-03-01 22:55:10 +00:00
Tom Hughes
53aa7259bb
Merge remote-tracking branch 'upstream/pull/3345'
2022-02-13 18:39:21 +00:00
Andy Allan
1a11c4dc19
Use a state machine for user status
...
The user status is a bit complex, since there are various states and
not all transitions between them make sense.
Using AASM means that we can name and restrict the transitions, which
hopefully makes them easier to reason about.
2022-01-12 18:16:14 +00:00
Tom Hughes
0410596908
Switch traces to use ActiveStorage
2021-12-16 18:45:31 +00:00
Tom Hughes
6c6e8883f7
Introduce privileged scopes that only an administrator can enable
2021-08-26 17:22:24 +01:00
Tom Hughes
608aafbf14
Make /api/0.6/permissions work for OAuth 2 clients
2021-06-27 00:38:16 +01:00
Tom Hughes
f064a18a16
Add tests for OAuth2
2021-05-18 12:05:33 +01:00
Tom Hughes
0654be27f9
Fix new rubocop warnings
2021-01-11 19:17:31 +00:00
Tom Hughes
f75eb6fe9e
Refactor more controller tests
2020-04-27 22:24:28 +01: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
8407c0dd98
Use the settings for the destination of the gpx fixture symlinks
...
This lets us change the settings values and have the fixtures appear
in the right place.
2020-03-18 14:58:48 +01:00
Tom Hughes
4b8f0a7389
Give factory created traces a size
...
Traces which are marked as inserted are expected to have a size.
2019-10-13 12:18:57 +01: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
Andy Allan
35a2d66e19
Remove require_terms_agreed configuration option
...
This has been set to true for 6 years in production. Refs #2097
As per other user settings, we set the terms as seen by default for tests,
and we can override that when necessary for specific tests.
2019-02-06 15:50:57 +01:00
Andy Allan
8f70fb2114
Use CanCanCan for changeset comments
...
This introduces different deny_access handlers for web and api requests, since we want to avoid sending redirects as API responses. See #2064 for discussion.
2018-11-28 12:35:45 +01:00
Tom Hughes
06915a77b5
Fix FactoryBot deprecation warnings
2018-08-28 19:12:01 +01:00
Tom Hughes
e5604ce98e
Assign vandalism reports for users to moderators
2018-06-17 11:14:19 +01:00
Andy Allan
63992d83bd
Store the report category.
2017-12-13 16:02:55 +00:00
Andy Allan
f5228657fe
Refactor factories to use FactoryBot
2017-11-29 12:33:23 +00:00
Andy Allan
effb1b7f41
Merge branch 'master' into moderation
2017-11-29 12:18:39 +00:00
Tom Hughes
b2fa947502
Replace factory_girl with factory_bot
2017-10-29 19:29:30 +00:00
Andy Allan
c00c515d9d
Ensure report details are not blank.
2017-09-06 18:17:54 +01:00
Andy Allan
99df5f6179
Rename association to reported_user, for clarity
2017-07-12 11:44:05 +01:00
Andy Allan
6f375ef493
Get tests passing. Use factories instead of fixtures.
2017-07-12 11:38:50 +01:00
Andy Allan
3f3ffdfea1
Refactor old_relation_controller tests to use factories.
2017-05-10 14:11:53 +01:00
Andy Allan
3fa3658efa
Update old_ways_controller tests to use factories.
2017-05-10 13:38:10 +01:00
Andy Allan
1df5bd247f
Ensure the old nodes are created with the same changeset
...
Not often important, but the most recent old_node should definitely
have the same changeset as the node itself.
2017-05-10 11:51:43 +01:00
Andy Allan
d48603d9e0
Add a way_with_nodes factory, and use it in the way_controller tests.
2017-04-26 08:34:01 +02:00
Andy Allan
75c5d6619a
Refactor some amf_controller tests to use factories.
2017-04-25 17:47:58 +02:00