mastodon/spec/controllers
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.
2022-01-28 00:46:42 +01:00
..
activitypub Add support for private pinned posts (#16954) 2022-01-17 00:49:55 +01:00
admin Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
api Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
auth Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
concerns Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
oauth
settings Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
well_known Remove Keybase integration (#17045) 2021-11-26 05:58:18 +01:00
about_controller_spec.rb
account_follow_controller_spec.rb
account_unfollow_controller_spec.rb
accounts_controller_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
application_controller_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
authorize_interactions_controller_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
emojis_controller_spec.rb
follower_accounts_controller_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
following_accounts_controller_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
home_controller_spec.rb Change routing paths to use usernames in web UI (#16171) 2021-09-26 05:46:13 +02:00
intents_controller_spec.rb
invites_controller_spec.rb
manifests_controller_spec.rb
media_controller_spec.rb Fix error when rendering public pages with media attachments (#16763) 2021-10-13 15:27:19 +02:00
media_proxy_controller_spec.rb
relationships_controller_spec.rb Remove PubSubHubbub-related columns from accounts table (#16170) 2021-05-07 19:32:58 +02:00
remote_follow_controller_spec.rb Add support for reversible suspensions through ActivityPub (#14989) 2020-11-08 00:28:39 +01:00
remote_interaction_controller_spec.rb
shares_controller_spec.rb
statuses_cleanup_controller_spec.rb Add feature to automatically delete old toots (#16529) 2021-08-09 23:11:50 +02:00
statuses_controller_spec.rb
tags_controller_spec.rb