You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/spec/controllers/admin
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
..
account_moderation_notes_controller_spec.rb Add tests for account_moderation_notes_controller (#7524) 7 years ago
accounts_controller_spec.rb Refactor and improve tests (#17386) 3 years ago
action_logs_controller_spec.rb Add spec for Admin::ActionLogsController#index (#9522) 7 years ago
base_controller_spec.rb Improve require_admin! and require_staff! filters (#7018) 7 years ago
change_email_controller_spec.rb Refactor and improve tests (#17386) 3 years ago
confirmations_controller_spec.rb Refactor and improve tests (#17386) 3 years ago
custom_emojis_controller_spec.rb Add batch actions and categories to admin UI for custom emojis (#11793) 6 years ago
dashboard_controller_spec.rb Add Ruby 3.0 support (#16046) 4 years ago
domain_blocks_controller_spec.rb Record account suspend/silence time and keep track of domain blocks (#10660) 6 years ago
email_domain_blocks_controller_spec.rb Lint pass (#8876) 7 years ago
instances_controller_spec.rb Add ability to purge undeliverable domains from admin interface (#16686) 4 years ago
invites_controller_spec.rb Add specs for Admin::InvitesController (#9471) 7 years ago
report_notes_controller_spec.rb Add notifications for statuses deleted by moderators (#17204) 3 years ago
reports_controller_spec.rb Add notifications for statuses deleted by moderators (#17204) 3 years ago
resets_controller_spec.rb Refactor and improve tests (#17386) 3 years ago
roles_controller_spec.rb Add tests for admin/roles_controller (#7421) 7 years ago
settings_controller_spec.rb Add validations to admin settings (#10348) 6 years ago
statuses_controller_spec.rb Add notifications for statuses deleted by moderators (#17204) 3 years ago
tags_controller_spec.rb Add trending links (#16917) 4 years ago
two_factor_authentications_controller_spec.rb Add ability to skip sign-in token authentication for specific users (#16427) 4 years ago