mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Add webfinger_discovery_request
to resolve account service spec
This commit is contained in:
parent
c36a76b9eb
commit
b9ef094f36
@ -28,7 +28,7 @@ RSpec.describe ResolveAccountService do
|
|||||||
|
|
||||||
it 'does not make a webfinger query' do
|
it 'does not make a webfinger query' do
|
||||||
subject.call('foo@ap.example.com', skip_webfinger: true)
|
subject.call('foo@ap.example.com', skip_webfinger: true)
|
||||||
expect(a_request(:get, 'https://ap.example.com/.well-known/webfinger?resource=acct:foo@ap.example.com')).to_not have_been_made
|
expect(webfinger_discovery_request).to_not have_been_made
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ RSpec.describe ResolveAccountService do
|
|||||||
|
|
||||||
it 'does not make a webfinger query' do
|
it 'does not make a webfinger query' do
|
||||||
subject.call('foo@ap.example.com', skip_webfinger: true)
|
subject.call('foo@ap.example.com', skip_webfinger: true)
|
||||||
expect(a_request(:get, 'https://ap.example.com/.well-known/webfinger?resource=acct:foo@ap.example.com')).to_not have_been_made
|
expect(webfinger_discovery_request).to_not have_been_made
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -51,9 +51,16 @@ RSpec.describe ResolveAccountService do
|
|||||||
|
|
||||||
it 'does not make a webfinger query' do
|
it 'does not make a webfinger query' do
|
||||||
subject.call('foo@ap.example.com', skip_webfinger: true)
|
subject.call('foo@ap.example.com', skip_webfinger: true)
|
||||||
expect(a_request(:get, 'https://ap.example.com/.well-known/webfinger?resource=acct:foo@ap.example.com')).to_not have_been_made
|
expect(webfinger_discovery_request).to_not have_been_made
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def webfinger_discovery_request
|
||||||
|
a_request(
|
||||||
|
:get,
|
||||||
|
'https://ap.example.com/.well-known/webfinger?resource=acct:foo@ap.example.com'
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when there is an LRDD endpoint but no resolvable account' do
|
context 'when there is an LRDD endpoint but no resolvable account' do
|
||||||
|
Loading…
Reference in New Issue
Block a user