From: Ivan Tashkinov Date: Mon, 28 Jan 2019 12:39:14 +0000 (+0300) Subject: [#534] Merged `upstream/develop`. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=d3f9e6f6fed382ede8e314c370c21e84a119f65a;p=akkoma [#534] Merged `upstream/develop`. --- d3f9e6f6fed382ede8e314c370c21e84a119f65a diff --cc test/support/http_request_mock.ex index 3d6efd52c,3043d2be6..bcdf2e006 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@@ -653,14 -653,14 +653,22 @@@ defmodule HttpRequestMock d {:ok, Tesla.Mock.json(%{"id" => "https://social.heldscal.la/user/23211"}, status: 200)} end + def get("http://example.com/ogp", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}} + end + + def get("http://example.com/empty", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: "hello"}} + end + + def get("http://404.site" <> _, _, _, _) do + {:ok, + %Tesla.Env{ + status: 404, + body: "" + }} + end + def get(url, query, body, headers) do {:error, "Not implemented the mock response for get #{inspect(url)}, #{query}, #{inspect(body)}, #{