Add delay to profile updates to debounce them (#34137)

This commit is contained in:
KMY 2025-04-03 06:57:54 +09:00
parent 577361ca9a
commit bccc4131a3
11 changed files with 15 additions and 18 deletions

View file

@ -7,7 +7,6 @@ RSpec.describe 'Settings profile page' do
let(:account) { user.account }
before do
allow(ActivityPub::UpdateDistributionWorker).to receive(:perform_async)
sign_in user
end
@ -24,7 +23,7 @@ RSpec.describe 'Settings profile page' do
.to change { account.reload.display_name }.to('New name')
.and(change { account.reload.avatar.instance.avatar_file_name }.from(nil).to(be_present))
expect(ActivityPub::UpdateDistributionWorker)
.to have_received(:perform_async).with(account.id)
.to have_enqueued_sidekiq_job(account.id)
end
def display_name_field