2
0

Fix failure to verify changes in api/v1/accounts/credentials spec (#35951)

This commit is contained in:
Matt Jankowski
2025-08-29 04:14:23 -04:00
committed by GitHub
parent 97d80265b4
commit 5f1e6a5886

View File

@@ -101,20 +101,14 @@ RSpec.describe 'credentials API' do
.to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body).to include({
source: hash_including({
discoverable: true,
indexable: true,
}),
locked: false,
})
expect(ActivityPub::UpdateDistributionWorker)
.to have_enqueued_sidekiq_job(user.account_id)
end
def expect_account_updates
expect(response.parsed_body)
.to include({
source: hash_including({
discoverable: true,
indexable: true,
}),
locked: false,
})
expect(user.account.reload)
.to have_attributes(
display_name: eq("Alice Isn't Dead"),
@@ -123,14 +117,13 @@ RSpec.describe 'credentials API' do
header: exist,
attribution_domains: ['example.com']
)
end
def expect_user_updates
expect(user.reload)
.to have_attributes(
setting_default_privacy: eq('unlisted'),
setting_default_sensitive: be(true)
)
expect(ActivityPub::UpdateDistributionWorker)
.to have_enqueued_sidekiq_job(user.account_id)
end
end
end