Fix remote_account_service_spec
This commit is contained in:
parent
e2923bff51
commit
27391f1bc7
3 changed files with 8 additions and 0 deletions
|
@ -46,6 +46,7 @@ RSpec.describe ActivityPub::FetchRemoteActorService, type: :service do
|
|||
|
||||
stub_request(:get, 'https://example.com/alice').to_return(body: Oj.dump(actor))
|
||||
stub_request(:get, 'https://example.com/.well-known/webfinger?resource=acct:alice@example.com').to_return(body: Oj.dump(webfinger), headers: { 'Content-Type': 'application/jrd+json' })
|
||||
stub_request(:get, 'https://example.com/.well-known/nodeinfo').to_return(body: '{}')
|
||||
end
|
||||
|
||||
it 'fetches resource' do
|
||||
|
@ -69,6 +70,7 @@ RSpec.describe ActivityPub::FetchRemoteActorService, type: :service do
|
|||
before do
|
||||
stub_request(:get, 'https://example.com/alice').to_return(body: Oj.dump(actor))
|
||||
stub_request(:get, 'https://example.com/.well-known/webfinger?resource=acct:alice@example.com').to_return(body: Oj.dump(webfinger), headers: { 'Content-Type': 'application/jrd+json' })
|
||||
stub_request(:get, 'https://example.com/.well-known/nodeinfo').to_return(body: '{}')
|
||||
end
|
||||
|
||||
it 'fetches resource' do
|
||||
|
@ -96,6 +98,7 @@ RSpec.describe ActivityPub::FetchRemoteActorService, type: :service do
|
|||
stub_request(:get, 'https://example.com/alice').to_return(body: Oj.dump(actor))
|
||||
stub_request(:get, 'https://example.com/.well-known/webfinger?resource=acct:alice@example.com').to_return(body: Oj.dump(webfinger), headers: { 'Content-Type': 'application/jrd+json' })
|
||||
stub_request(:get, 'https://iscool.af/.well-known/webfinger?resource=acct:alice@iscool.af').to_return(body: Oj.dump(webfinger), headers: { 'Content-Type': 'application/jrd+json' })
|
||||
stub_request(:get, 'https://iscool.af/.well-known/nodeinfo').to_return(body: '{}')
|
||||
end
|
||||
|
||||
it 'fetches resource' do
|
||||
|
@ -127,6 +130,7 @@ RSpec.describe ActivityPub::FetchRemoteActorService, type: :service do
|
|||
before do
|
||||
stub_request(:get, 'https://example.com/alice').to_return(body: Oj.dump(actor))
|
||||
stub_request(:get, 'https://example.com/.well-known/webfinger?resource=acct:alice@example.com').to_return(body: Oj.dump(webfinger), headers: { 'Content-Type': 'application/jrd+json' })
|
||||
stub_request(:get, 'https://example.com/.well-known/nodeinfo').to_return(body: '{}')
|
||||
end
|
||||
|
||||
it 'fetches resource' do
|
||||
|
@ -151,6 +155,7 @@ RSpec.describe ActivityPub::FetchRemoteActorService, type: :service do
|
|||
stub_request(:get, 'https://example.com/alice').to_return(body: Oj.dump(actor))
|
||||
stub_request(:get, 'https://example.com/.well-known/webfinger?resource=acct:alice@example.com').to_return(body: Oj.dump(webfinger), headers: { 'Content-Type': 'application/jrd+json' })
|
||||
stub_request(:get, 'https://iscool.af/.well-known/webfinger?resource=acct:alice@iscool.af').to_return(body: Oj.dump(webfinger), headers: { 'Content-Type': 'application/jrd+json' })
|
||||
stub_request(:get, 'https://iscool.af/.well-known/nodeinfo').to_return(body: '{}')
|
||||
end
|
||||
|
||||
it 'fetches resource' do
|
||||
|
|
|
@ -52,6 +52,7 @@ RSpec.describe ActivityPub::FetchRemoteKeyService, type: :service do
|
|||
before do
|
||||
stub_request(:get, 'https://example.com/alice').to_return(body: Oj.dump(actor))
|
||||
stub_request(:get, 'https://example.com/.well-known/webfinger?resource=acct:alice@example.com').to_return(body: Oj.dump(webfinger), headers: { 'Content-Type': 'application/jrd+json' })
|
||||
stub_request(:get, 'https://example.com/.well-known/nodeinfo').to_return(body: '[]')
|
||||
end
|
||||
|
||||
describe '#call' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue