Get the nodeinfo address from the well-known

This commit is contained in:
Ekaterina Vaartis 2019-09-18 19:48:25 +03:00
commit b585134c90
2 changed files with 13 additions and 1 deletions

View file

@ -54,9 +54,15 @@ defmodule Pleroma.Web.PleromaAPI.EmojiAPIControllerTest do
end)
mock(fn
%{method: :get, url: "https://old-instance/.well-known/nodeinfo"} ->
json([%{href: "https://old-instance/nodeinfo/2.1.json"}])
%{method: :get, url: "https://old-instance/nodeinfo/2.1.json"} ->
json(%{metadata: %{features: []}})
%{method: :get, url: "https://example.com/.well-known/nodeinfo"} ->
json([%{href: "https://example.com/nodeinfo/2.1.json"}])
%{method: :get, url: "https://example.com/nodeinfo/2.1.json"} ->
json(%{metadata: %{features: ["shareable_emoji_packs"]}})