Select correct self link when parsing Webfinger response (#31110)

This commit is contained in:
Adam Niedzielski 2024-07-23 16:42:31 +02:00 committed by KMY
parent fe85d7400a
commit ad7d1fff25
10 changed files with 73 additions and 26 deletions

View file

@ -601,7 +601,7 @@ RSpec.describe ActivityPub::ProcessAccountService do
}.with_indifferent_access
webfinger = {
subject: "acct:user#{i}@foo.test",
links: [{ rel: 'self', href: "https://foo.test/users/#{i}" }],
links: [{ rel: 'self', href: "https://foo.test/users/#{i}", type: 'application/activity+json' }],
}.with_indifferent_access
stub_request(:get, "https://foo.test/users/#{i}").to_return(status: 200, body: actor_json.to_json, headers: { 'Content-Type': 'application/activity+json' })
stub_request(:get, "https://foo.test/users/#{i}/featured").to_return(status: 200, body: featured_json.to_json, headers: { 'Content-Type': 'application/activity+json' })