Merge branch 'bugfix/rel-me_list' into 'develop'
Web.RelMe: Fix having other values in rel attr See merge request pleroma/pleroma!901
This commit is contained in:
commit
07f8c79a69
4 changed files with 29 additions and 1 deletions
|
|
@ -9,6 +9,12 @@ defmodule Pleroma.Web.RelMeTest do
|
|||
} ->
|
||||
%Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_anchor.html")}
|
||||
|
||||
%{
|
||||
method: :get,
|
||||
url: "http://example.com/rel_me/anchor_nofollow"
|
||||
} ->
|
||||
%Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_anchor_nofollow.html")}
|
||||
|
||||
%{
|
||||
method: :get,
|
||||
url: "http://example.com/rel_me/link"
|
||||
|
|
@ -33,6 +39,7 @@ defmodule Pleroma.Web.RelMeTest do
|
|||
|
||||
assert Pleroma.Web.RelMe.parse("http://example.com/rel_me/link") == {:ok, hrefs}
|
||||
assert Pleroma.Web.RelMe.parse("http://example.com/rel_me/anchor") == {:ok, hrefs}
|
||||
assert Pleroma.Web.RelMe.parse("http://example.com/rel_me/anchor_nofollow") == {:ok, hrefs}
|
||||
end
|
||||
|
||||
test "maybe_put_rel_me/2" do
|
||||
|
|
@ -49,6 +56,11 @@ defmodule Pleroma.Web.RelMeTest do
|
|||
assert Pleroma.Web.RelMe.maybe_put_rel_me("http://example.com/rel_me/anchor", profile_urls) ==
|
||||
attr
|
||||
|
||||
assert Pleroma.Web.RelMe.maybe_put_rel_me(
|
||||
"http://example.com/rel_me/anchor_nofollow",
|
||||
profile_urls
|
||||
) == attr
|
||||
|
||||
assert Pleroma.Web.RelMe.maybe_put_rel_me("http://example.com/rel_me/link", profile_urls) ==
|
||||
attr
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue