Move get_favicon to Pleroma.Instances, use /

This commit is contained in:
Haelwenn (lanodan) Monnier 2020-03-02 05:38:25 +01:00
commit 6a679d80c9
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
7 changed files with 353 additions and 34 deletions

View file

@ -1342,10 +1342,18 @@ defmodule HttpRequestMock do
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/relay/relay.json")}}
end
def get("http://localhost:4001/users/" <> _, _, _, _) do
def get("http://localhost:4001/", _, "", Accept: "text/html") do
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/7369654.html")}}
end
def get("https://osada.macgirvin.com/", _, "", Accept: "text/html") do
{:ok,
%Tesla.Env{
status: 200,
body: File.read!("test/fixtures/tesla_mock/https___osada.macgirvin.com.html")
}}
end
def get(url, query, body, headers) do
{:error,
"Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{