* Add: #591 リモート保留中アカウントからメンションが来た場合にuriを記録し、承認時にフェッチしに行く処理 * Rename fetch_remove_status_worker.rb to fetch_remote_status_worker.rb * Wip * Add lock code
This commit is contained in:
parent
b2acc7dbb8
commit
2ab9ea642a
22 changed files with 307 additions and 15 deletions
|
@ -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) }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue