|
|
|
@ -80,24 +80,25 @@ RSpec.describe VerifyLinkService, type: :service do
|
|
|
|
|
"
|
|
|
|
|
<!doctype html>
|
|
|
|
|
<body>
|
|
|
|
|
<a rel=\"me\" href=\"#{ActivityPub::TagManager.instance.url_for(account)}\"
|
|
|
|
|
<a rel=\"me\" href=\"#{ActivityPub::TagManager.instance.url_for(account)}\">
|
|
|
|
|
"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'marks the field as not verified' do
|
|
|
|
|
expect(field.verified?).to be false
|
|
|
|
|
it 'marks the field as verified' do
|
|
|
|
|
expect(field.verified?).to be true
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
context 'when a link back might be truncated' do
|
|
|
|
|
context 'when a link tag might be truncated' do
|
|
|
|
|
let(:html) do
|
|
|
|
|
"
|
|
|
|
|
<!doctype html>
|
|
|
|
|
<body>
|
|
|
|
|
<a rel=\"me\" href=\"#{ActivityPub::TagManager.instance.url_for(account)}"
|
|
|
|
|
<a rel=\"me\" href=\"#{ActivityPub::TagManager.instance.url_for(account)}\"
|
|
|
|
|
"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'does not mark the field as verified' do
|
|
|
|
|
it 'marks the field as not verified' do
|
|
|
|
|
expect(field.verified?).to be false
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|