mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-21 09:43:17 +00:00
Add delay to profile updates to debounce them (#34137)
This commit is contained in:
parent
483b4600b5
commit
91ef24d0e3
12 changed files with 127 additions and 26 deletions
|
|
@ -27,7 +27,7 @@ describe Api::V1::Accounts::CredentialsController do
|
|||
|
||||
describe 'with valid data' do
|
||||
before do
|
||||
allow(ActivityPub::UpdateDistributionWorker).to receive(:perform_async)
|
||||
allow(ActivityPub::UpdateDistributionWorker).to receive(:perform_in)
|
||||
|
||||
patch :update, params: {
|
||||
display_name: "Alice Isn't Dead",
|
||||
|
|
@ -58,7 +58,7 @@ describe Api::V1::Accounts::CredentialsController do
|
|||
end
|
||||
|
||||
it 'queues up an account update distribution' do
|
||||
expect(ActivityPub::UpdateDistributionWorker).to have_received(:perform_async).with(user.account_id)
|
||||
expect(ActivityPub::UpdateDistributionWorker).to have_received(:perform_in).with(anything, user.account_id)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue