Add: #595 リモート保留中アカウントからメンションが来た場合にuriを記録し、承認時にフェッチしに行く処理 (#620)

* Add: #591 リモート保留中アカウントからメンションが来た場合にuriを記録し、承認時にフェッチしに行く処理

* Rename fetch_remove_status_worker.rb to fetch_remote_status_worker.rb

* Wip

* Add lock code
This commit is contained in:
KMY(雪あすか) 2024-02-29 12:54:47 +09:00 committed by GitHub
parent b2acc7dbb8
commit 2ab9ea642a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 307 additions and 15 deletions

View file

@ -434,6 +434,18 @@ RSpec.describe Account do
end
end
describe '#approve_remote!' do
it 'calls worker' do
account = Fabricate(:account, suspended_at: Time.now.utc, suspension_origin: :local, remote_pending: true)
allow(ActivateRemoteAccountWorker).to receive(:perform_async)
account.approve_remote!
expect(account.remote_pending).to be false
expect(account.suspended?).to be false
expect(ActivateRemoteAccountWorker).to have_received(:perform_async).with(account.id)
end
end
describe '#favourited?' do
subject { Fabricate(:account) }