Commit Graph

12 Commits (3a91603b1507d3821e8a20734e6ed92ae4d06c3b)

Author SHA1 Message Date
Emelia Smith 19f9098551
Allow reports with long comments from remote instances, but truncate ()
Matt Jankowski 710745e16b
Fix RSpec/ContextWording cop ()
Eugen Rochko a9b5598c97
Change user settings to be stored in a more optimal way ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs ()
Nick Schonning 4552685f6b
Autofix Rubocop RSpec/LeadingSubject ()
Claire 26c51cfa07
Fix various rspec warnings in ReportService tests ()
* Fix various rspec warnings in ReportService tests

* Add tests to ReportService
Claire 1b4054256f
Fix crash when a remote Flag activity mentions a private post ()
* Add tests

* Fix crash when a remote Flag activity mentions a private post
Claire e38fc319dc
Refactor and improve tests ()
* Change account and user fabricators to simplify and improve tests

- `Fabricate(:account)` implicitly fabricates an associated `user` if
  no `domain` attribute is given (an account with `domain: nil` is
  considered a local account, but no user record was created), unless
  `user: nil` is passed
- `Fabricate(:account, user: Fabricate(:user))` should still be possible
  but is discouraged.

* Fix and refactor tests

- avoid passing unneeded attributes to `Fabricate(:user)` or
  `Fabricate(:account)`
- avoid embedding `Fabricate(:user)` into a `Fabricate(:account)` or the other
  way around
- prefer `Fabricate(:user, account_attributes: …)` to
  `Fabricate(:user, account: Fabricate(:account, …)`
- also, some tests were using remote accounts with local user records, which is
  not representative of production code.
ThibG a20354a20b Set and store report URIs ()
Fixes 
Eugen Rochko c593d6df9c
Add preference for report notification e-mails, skip for duplicates ()
If an unresolved report for the same target account already exists,
no new notification is generated
Eugen Rochko cb5b5cb5f7
Slightly reduce RAM usage ()
* No need to re-require sidekiq plugins, they are required via Gemfile

* Add derailed_benchmarks tool, no need to require TTY gems in Gemfile

* Replace ruby-oembed with FetchOEmbedService

Reduce startup by 45382 allocated objects

* Remove preloaded JSON-LD in favour of caching HTTP responses

Reduce boot RAM by about 6 MiB

* Fix tests

* Fix test suite by stubbing out JSON-LD contexts
Eugen Rochko 41a01bec23
Federated reports ()
* Fix : Federated reports

* UI for federated reports

* Add spec for ActivityPub Flag handler

* Add spec for ReportService