Test: アカウント削除時のブックマーク・スタンプなど削除のテスト (#276)

This commit is contained in:
KMY(雪あすか) 2023-11-11 11:06:08 +09:00 committed by GitHub
parent 878936d4be
commit 2753d44563
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 65 additions and 4 deletions

View file

@ -42,7 +42,6 @@ module AccountAssociations
has_many :report_notes, dependent: :destroy
has_many :custom_filters, inverse_of: :account, dependent: :destroy
has_many :antennas, inverse_of: :account, dependent: :destroy
has_many :antenna_accounts, inverse_of: :account, dependent: :destroy
# Moderation notes

View file

@ -11,6 +11,8 @@ class DeleteAccountService < BaseService
antennas
block_relationships
blocked_by_relationships
bookmark_categories
circles
conversation_mutes
conversations
custom_filters
@ -39,6 +41,8 @@ class DeleteAccountService < BaseService
account_notes
account_pins
aliases
antenna_accounts
circle_accounts
conversation_mutes
conversations
custom_filters
@ -225,6 +229,7 @@ class DeleteAccountService < BaseService
FeedManager.instance.clean_feeds!(:home, [@account.id])
FeedManager.instance.clean_feeds!(:list, @account.owned_lists.pluck(:id))
FeedManager.instance.clean_feeds!(:antenna, @account.antennas.pluck(:id))
end
def purge_profile!