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