about summary refs log tree commit diff
path: root/spec/controllers/api/v1/accounts
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/api/v1/accounts')
-rw-r--r--spec/controllers/api/v1/accounts/credentials_controller_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb
index 4a3100348..bc89772b9 100644
--- a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb
+++ b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb
@@ -20,6 +20,8 @@ describe Api::V1::Accounts::CredentialsController do
   describe 'PATCH #update' do
     describe 'with valid data' do
       before do
+        allow(ActivityPub::UpdateDistributionWorker).to receive(:perform_async)
+
         patch :update, params: {
           display_name: "Alice Isn't Dead",
           note: "Hi!\n\nToot toot!",
@@ -40,6 +42,10 @@ describe Api::V1::Accounts::CredentialsController do
         expect(user.account.avatar).to exist
         expect(user.account.header).to exist
       end
+
+      it 'queues up an account update distribution' do
+        expect(ActivityPub::UpdateDistributionWorker).to have_received(:perform_async).with(user.account_id)
+      end
     end
 
     describe 'with invalid data' do