diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2018-09-19 23:47:31 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-09-19 16:47:31 +0200 |
commit | 3da1cc7d5e9df22d3445cdf07020b6c57d14fa5c (patch) | |
tree | 363101f6dc3b3bb6f2e4124c195ea7236c9a4e02 /spec/services | |
parent | d149c2dc78a0198891c19ae830c537e7ce459217 (diff) |
Fix failed profile verification when rel attribute including values other than me (#8733)
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/verify_link_service_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/services/verify_link_service_spec.rb b/spec/services/verify_link_service_spec.rb index 8ce867e9d..acd4e851e 100644 --- a/spec/services/verify_link_service_spec.rb +++ b/spec/services/verify_link_service_spec.rb @@ -26,6 +26,21 @@ RSpec.describe VerifyLinkService, type: :service do end end + context 'when a link contains an <a rel="noopener"> back' do + let(:html) do + <<-HTML + <!doctype html> + <body> + <a href="#{ActivityPub::TagManager.instance.url_for(account)}" rel="noopener me" target="_blank">Follow me on Mastodon</a> + </body> + HTML + end + + it 'marks the field as verified' do + expect(field.verified?).to be true + end + end + context 'when a link contains a <link> back' do let(:html) do <<-HTML |