mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-24 00:54:02 -05:00
e38fc319dc
* 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. |
||
---|---|---|
.. | ||
account_moderation_notes_controller_spec.rb | ||
accounts_controller_spec.rb | ||
action_logs_controller_spec.rb | ||
base_controller_spec.rb | ||
change_email_controller_spec.rb | ||
confirmations_controller_spec.rb | ||
custom_emojis_controller_spec.rb | ||
dashboard_controller_spec.rb | ||
domain_blocks_controller_spec.rb | ||
email_domain_blocks_controller_spec.rb | ||
instances_controller_spec.rb | ||
invites_controller_spec.rb | ||
report_notes_controller_spec.rb | ||
reports_controller_spec.rb | ||
resets_controller_spec.rb | ||
roles_controller_spec.rb | ||
settings_controller_spec.rb | ||
statuses_controller_spec.rb | ||
tags_controller_spec.rb | ||
two_factor_authentications_controller_spec.rb |