parent
aadde1bbaa
commit
75d3b2dfd0
3 changed files with 0 additions and 8 deletions
|
@ -19,7 +19,6 @@ module Account::Associations
|
|||
has_many :conversations, class_name: 'AccountConversation', dependent: :destroy, inverse_of: :account
|
||||
has_many :scheduled_statuses, inverse_of: :account, dependent: :destroy
|
||||
has_many :scheduled_expiration_statuses, inverse_of: :account, dependent: :destroy
|
||||
has_many :ng_rule_histories, inverse_of: :account, dependent: :destroy
|
||||
|
||||
# Notifications
|
||||
has_many :notifications, inverse_of: :account, dependent: :destroy
|
||||
|
|
|
@ -102,7 +102,6 @@ class DeleteAccountService < BaseService
|
|||
record_severed_relationships!
|
||||
distribute_activities!
|
||||
purge_content!
|
||||
remove_ng_rule_history_relations!
|
||||
fulfill_deletion_request!
|
||||
end
|
||||
|
||||
|
@ -274,10 +273,6 @@ class DeleteAccountService < BaseService
|
|||
@account.save!
|
||||
end
|
||||
|
||||
def remove_ng_rule_history_relations!
|
||||
@account.ng_rule_histories.update_all(account_id: Account.representative.id)
|
||||
end
|
||||
|
||||
def fulfill_deletion_request!
|
||||
@account.deletion_request&.destroy
|
||||
end
|
||||
|
|
|
@ -83,8 +83,6 @@ RSpec.describe DeleteAccountService do
|
|||
expect { pending_follow_request.reload }.to raise_error(ActiveRecord::RecordNotFound)
|
||||
expect { pending_status.reload }.to raise_error(ActiveRecord::RecordNotFound)
|
||||
expect { fetchable_pending_status.reload }.to raise_error(ActiveRecord::RecordNotFound)
|
||||
|
||||
expect(ng_rule_history.account_id).to eq Account.representative.id
|
||||
end
|
||||
|
||||
def expect_deletion_of_associated_owned_records
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue