Add stricter protocol fields validation for accounts (#25937)
This commit is contained in:
parent
1cceb62afd
commit
1e3b19230a
19 changed files with 96 additions and 49 deletions
|
@ -8,7 +8,7 @@ describe ResolveURLService, type: :service do
|
|||
describe '#call' do
|
||||
it 'returns nil when there is no resource url' do
|
||||
url = 'http://example.com/missing-resource'
|
||||
known_account = Fabricate(:account, uri: url)
|
||||
known_account = Fabricate(:account, uri: url, domain: 'example.com')
|
||||
service = instance_double(FetchResourceService)
|
||||
|
||||
allow(FetchResourceService).to receive(:new).and_return service
|
||||
|
@ -20,7 +20,7 @@ describe ResolveURLService, type: :service do
|
|||
|
||||
it 'returns known account on temporary error' do
|
||||
url = 'http://example.com/missing-resource'
|
||||
known_account = Fabricate(:account, uri: url)
|
||||
known_account = Fabricate(:account, uri: url, domain: 'example.com')
|
||||
service = instance_double(FetchResourceService)
|
||||
|
||||
allow(FetchResourceService).to receive(:new).and_return service
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue