mastodon/spec/services
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 editing for published statuses (#16697) 2022-01-19 22:37:27 +01:00
account_search_service_spec.rb
account_statuses_cleanup_service_spec.rb
after_block_domain_from_account_service_spec.rb
after_block_service_spec.rb
app_sign_up_service_spec.rb
authorize_follow_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
batched_remove_status_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
block_domain_service_spec.rb
block_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
bootstrap_timeline_service_spec.rb
clear_domain_media_service_spec.rb
delete_account_service_spec.rb
fan_out_on_write_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
favourite_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
fetch_link_card_service_spec.rb Add support for structured data and more OpenGraph tags to link cards (#16938) 2021-11-05 23:23:05 +01:00
fetch_oembed_service_spec.rb Fix some link previews being incorrectly generated from other prior links (#16885) 2021-10-21 20:39:35 +02:00
fetch_remote_status_service_spec.rb
fetch_resource_service_spec.rb
follow_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
import_service_spec.rb
mute_service_spec.rb
notify_service_spec.rb Fix filtering DMs from non-followed users (#17042) 2021-11-25 23:46:30 +01:00
post_status_service_spec.rb Fix scheduled statuses decreasing statuses counts (#16791) 2021-10-14 19:59:21 +02:00
precompute_feed_service_spec.rb
process_mentions_service_spec.rb Add support for editing for published statuses (#16697) 2022-01-19 22:37:27 +01:00
purge_domain_service_spec.rb Add ability to purge undeliverable domains from admin interface (#16686) 2021-12-17 23:01:21 +01:00
reblog_service_spec.rb
reject_follow_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
remove_from_follwers_service_spec.rb Add remove from followers api (#16864) 2021-10-18 12:02:35 +02:00
remove_status_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
report_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
resolve_account_service_spec.rb
resolve_url_service_spec.rb
search_service_spec.rb
suspend_account_service_spec.rb
unallow_domain_service_spec.rb
unblock_domain_service_spec.rb
unblock_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
unfollow_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
unmute_service_spec.rb
unsuspend_account_service_spec.rb
update_account_service_spec.rb Refactor and improve tests (#17386) 2022-01-28 00:46:42 +01:00
verify_link_service_spec.rb