mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-23 15:24:53 +00: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. |
||
---|---|---|
.. | ||
activitypub | ||
admin | ||
api | ||
auth | ||
concerns | ||
oauth | ||
settings | ||
well_known | ||
about_controller_spec.rb | ||
account_follow_controller_spec.rb | ||
account_unfollow_controller_spec.rb | ||
accounts_controller_spec.rb | ||
application_controller_spec.rb | ||
authorize_interactions_controller_spec.rb | ||
emojis_controller_spec.rb | ||
follower_accounts_controller_spec.rb | ||
following_accounts_controller_spec.rb | ||
home_controller_spec.rb | ||
intents_controller_spec.rb | ||
invites_controller_spec.rb | ||
manifests_controller_spec.rb | ||
media_controller_spec.rb | ||
media_proxy_controller_spec.rb | ||
relationships_controller_spec.rb | ||
remote_follow_controller_spec.rb | ||
remote_interaction_controller_spec.rb | ||
shares_controller_spec.rb | ||
statuses_cleanup_controller_spec.rb | ||
statuses_controller_spec.rb | ||
tags_controller_spec.rb |