Commit Graph

112 Commits (1f1c75bba56f4b22c5f4c745b8f50a002001213c)

Author SHA1 Message Date
Matt Jankowski ce78a9c9ac
Clean up `two_factor_authentication/confirmations` controller spec (#28128) 1 year ago
Matt Jankowski 973597c6f1
Consolidate configuration of `Sidekiq::Testing.fake!` setup (#28046) 1 year ago
Eugen Rochko cdc57c74b7
Fix unsupported time zone or locale preventing sign-up (#28035)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Matt Jankowski f7cb64a184
Add coverage for `settings/privacy` controller (#28000) 1 year ago
Matt Jankowski b2e8af8889
Add coverage for `settings/verifications` controller (#28001) 1 year ago
Matt Jankowski b2c5b20ef2
Fix `RSpec/AnyInstance` cop (#27810) 1 year ago
Matt Jankowski 9dc3ce878b
Speed-up in `Settings::` controllers specs (#27808) 1 year ago
Matt Jankowski ce91d14d48
Fix `Style/WordArray` cop (#27770) 1 year ago
Matt Jankowski e545978076
Use framework helpers instead of i-vars in controller specs (#27767) 1 year ago
Matt Jankowski 708299bb0d
Misc coverage improvements for `Admin::` and `Settings::` controllers (#25346) 1 year ago
Matt Jankowski 658742b3cd
Fix `Lint/AmbiguousBlockAssociation` cop (#25921) 2 years ago
Matt Jankowski 62c996b52d
Reduce `RSpec/MultipleExpectations` cop max to 8 (#25313) 2 years ago
Matt Jankowski d2e5430d4a
Fix RSpec/ExpectChange cop (#25101) 2 years ago
Matt Jankowski 778e4a7bf7
Fix RSpec/ExpectInHook cop (#25100) 2 years ago
Matt Jankowski c97b611b6b
Fix RSpec/InferredSpecType cop (#24736) 2 years ago
Matt Jankowski 710745e16b
Fix RSpec/ContextWording cop (#24739) 2 years ago
Matt Jankowski 08fb9d300a
Spec coverage for settings/preferences/* controllers (#24825) 2 years ago
Claire 32a030dd74
Rewrite import feature (#21054) 2 years ago
Nick Schonning 90beba57d8
Autofix Rubocop Rails/ResponseParsedBody (#24051) 2 years ago
Eugen Rochko e98c86050a
Refactor `Cache-Control` and `Vary` definitions (#24347) 2 years ago
Matt Jankowski 36eeb70d53
Spec coverage on Settings/ controllers specs (#24221) 2 years ago
Eugen Rochko a9b5598c97
Change user settings to be stored in a more optimal way (#23630)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Eugen Rochko 9bda933740
Change media upload limits and remove client-side resizing (#23726) 2 years ago
Claire a232a1feb8
Fix misleading error code when receiving invalid WebAuthn credentials (#23568) 2 years ago
Matt Jankowski 6a57c42316
Settings controllers specs (#23915) 2 years ago
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs (#23790) 2 years ago
Nick Schonning bf785df9fe
Audofix Rubocop Style/WordArray (#23739) 2 years ago
Nick Schonning 38a1d8bb85
Autofix Rubocop RSpec/ImplicitSubject (#23721) 2 years ago
Nick Schonning aef0051fd0
Enable Rubocop HTTP status rules (#23717) 2 years ago
Nick Schonning 65ba0d92ef
Enable Rubocop RSpec/NotToNot (#23723) 2 years ago
Nick Schonning 21bf326356
Autofix Rubocop Rails/Pluck (#23730) 2 years ago
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 2 years ago
Nick Schonning 3680e032b4
Autofix Rubocop RSpec/EmptyLineAfterFinalLet (#23707) 2 years ago
Nick Schonning 167709f6b0
Autofix Rubocop Style/BlockDelimiters (#23706) 2 years ago
Nick Schonning 5069769cbe
Autofix Rubocop Style/TrailingCommaInHashLiteral (#23693) 2 years ago
Nick Schonning b4cbfff3eb
Autofix Rubocop RSpec/ExcessiveDocstringSpacing (#23666) 2 years ago
Nick Schonning c0a645f647
Autofix Rubocop RSpec/ExampleWording (#23667) 2 years ago
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 2 years ago
Claire 20a479ff7c
Change `POST /settings/applications/:id` to regenerate token on scopes change (#23359)
Fixes #23096
2 years ago
Eugen Rochko 93f340a4bf
Remove setting that disables account deletes (#17683) 3 years ago
Eugen Rochko 50948b46aa
Add ability to filter followed accounts' posts by language (#19095) 3 years ago
Claire e34dd3644c
Remove unused `filtered_languages` column (#18533)
* Remove unused `filtered_languages` column

Fixes #18522

* Fix tests
3 years ago
luzpaz 898fe2fa8e
Fix typo in source `setted`->`set` (#18385)
Found via `codespell -q 3 -S ./CHANGELOG.md,./AUTHORS.md,./config/locales,./app/javascript/mastodon/locales -L ba,keypair,medias,ro`
3 years ago
Claire 30658924a8
Fix test-related issues (#17888)
* Remove obsolete RSS::Serializer test

Since #17828, RSS::Serializer no longer has specific code for deleted statuses,
but it is never called on deleted statuses anyway.

* Rename erroneously-named test files

* Fix failing test

* Fix test deprecation warnings

* Update CircleCI Ruby orb

1.4.0 has a bug that does not match all the test files due to incorrect
globbing
3 years ago
luzpaz 73f5e4a1d9
Fix various typos (#17621)
Found via `codespell -q 3 -S ./CHANGELOG.md,./AUTHORS.md,./config/locales,./app/javascript/mastodon/locales -L ba,keypair,medias,ro`
3 years ago
Claire e38fc319dc
Refactor and improve tests (#17386)
* 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.
3 years ago
Eugen Rochko 7de0ee7aba
Remove Keybase integration (#17045) 3 years ago
Claire 30ce6e395c
Fix user email address being banned on self-deletion (#16503)
* Add tests

* Fix user email address being banned on self-deletion

Fixes #16498
4 years ago
Claire cbd0ee1d07
Update Mastodon to Rails 6.1 (#15910)
* Update devise-two-factor to unreleased fork for Rails 6 support

Update tests to match new `rotp` version.

* Update nsa gem to unreleased fork for Rails 6 support

* Update rails to 6.1.3 and rails-i18n to 6.0

* Update to unreleased fork of pluck_each for Ruby 6 support

* Run "rails app:update"

* Add missing ActiveStorage config file

* Use config.ssl_options instead of removed ApplicationController#force_ssl

Disabled force_ssl-related tests as they do not seem to be easily testable
anymore.

* Fix nonce directives by removing Rails 5 specific monkey-patching

* Fix fixture_file_upload deprecation warning

* Fix yield-based test failing with Rails 6

* Use Rails 6's index_with when possible

* Use ActiveRecord::Cache::Store#delete_multi from Rails 6

This will yield better performances when deleting an account

* Disable Rails 6.1's automatic preload link headers

Since Rails 6.1, ActionView adds preload links for javascript files
in the Links header per default.

In our case, that will bloat headers too much and potentially cause
issues with reverse proxies. Furhermore, we don't need those links,
as we already output them as HTML link tags.

* Switch to Rails 6.0 default config

* Switch to Rails 6.1 default config

* Do not include autoload paths in the load path
4 years ago
ThibG a044ddac5b
Fix race conditions on account migration creation (#15597)
* Atomically check for processing lock in Move handler

* Prevent race condition when creating account migrations

Fixes #15595

* Add tests

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
4 years ago