test "returns a link to the xml lrdd" do
host_info = WebFinger.host_meta()
- assert String.contains?(host_info, Pleroma.Web.base_url())
+ assert String.contains?(host_info, Pleroma.Web.Endpoint.url())
end
end
test "returns error when there is no content-type header" do
Tesla.Mock.mock(fn
- %{url: "http://social.heldscal.la/.well-known/host-meta"} ->
+ %{url: "https://social.heldscal.la/.well-known/host-meta"} ->
{:ok,
%Tesla.Env{
status: 200,
test "it gets the xrd endpoint for statusnet" do
{:ok, template} = WebFinger.find_lrdd_template("status.alpicola.com")
- assert template == "http://status.alpicola.com/main/xrd?uri={uri}"
+ assert template == "https://status.alpicola.com/main/xrd?uri={uri}"
end
test "it works with idna domains as nickname" do
headers: [{"content-type", "application/jrd+json"}]
}}
- %{url: "http://mastodon.social/.well-known/host-meta"} ->
+ %{url: "https://mastodon.social/.well-known/host-meta"} ->
{:ok,
%Tesla.Env{
status: 200,
headers: [{"content-type", "application/xrd+xml"}]
}}
- %{url: "http://pawoo.net/.well-known/host-meta"} ->
+ %{url: "https://pawoo.net/.well-known/host-meta"} ->
{:ok,
%Tesla.Env{
status: 200,