diff options
author | marcin mikołajczak <git@mkljczk.pl> | 2024-01-31 22:19:33 +0100 |
---|---|---|
committer | marcin mikołajczak <git@mkljczk.pl> | 2024-01-31 22:19:33 +0100 |
commit | 226e53fdd73e95483efec08d11f6fae217b68f45 (patch) | |
tree | de3c09b6d5c625d41db8ef6fa54de74f642c2363 /test/support/http_request_mock.ex | |
parent | 9363ef53a34c9d96191bccaece76dd4e01f493b6 (diff) | |
parent | 3b9d991514e53ad8f442ffc674dd9b1422fdc415 (diff) | |
download | pleroma-226e53fdd73e95483efec08d11f6fae217b68f45.tar.gz pleroma-226e53fdd73e95483efec08d11f6fae217b68f45.zip |
Merge remote-tracking branch 'origin/develop' into status-notification-type
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'test/support/http_request_mock.ex')
-rw-r--r-- | test/support/http_request_mock.ex | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index b0cf613ac..f76128312 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -21,7 +21,7 @@ defmodule HttpRequestMock do else error -> with {:error, message} <- error do - Logger.warn(to_string(message)) + Logger.warning(to_string(message)) end {_, _r} = error @@ -178,7 +178,7 @@ defmodule HttpRequestMock do end def get( - "https://social.heldscal.la/.well-known/webfinger?resource=nonexistant@social.heldscal.la", + "https://social.heldscal.la/.well-known/webfinger?resource=nonexistent@social.heldscal.la", _, _, [{"accept", "application/xrd+xml,application/jrd+json"}] @@ -186,7 +186,7 @@ defmodule HttpRequestMock do {:ok, %Tesla.Env{ status: 200, - body: File.read!("test/fixtures/tesla_mock/nonexistant@social.heldscal.la.xml") + body: File.read!("test/fixtures/tesla_mock/nonexistent@social.heldscal.la.xml") }} end @@ -1380,6 +1380,15 @@ defmodule HttpRequestMock do }} end + def get("https://misskey.io/users/83ssedkv53", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/aimu@misskey.io.json"), + headers: activitypub_object_headers() + }} + end + def get("https://gleasonator.com/users/macgirvin", _, _, _) do {:ok, %Tesla.Env{ @@ -1446,6 +1455,15 @@ defmodule HttpRequestMock do }} end + def get("https://misskey.io/notes/8vs6wxufd0", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/misskey.io_8vs6wxufd0.json"), + headers: activitypub_object_headers() + }} + end + def get(url, query, body, headers) do {:error, "Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{inspect(headers)}"} |