diff options
author | Hélène <pleroma-dev@helene.moe> | 2022-08-10 04:21:28 +0200 |
---|---|---|
committer | Hélène <pleroma-dev@helene.moe> | 2022-08-15 01:46:55 +0200 |
commit | bb02ee99f58e378e33162211f41fe5979d5da8ae (patch) | |
tree | 3bf371b402adaf855d05cc8f10dc07a663a29b36 /test/support | |
parent | 3b6784b1de8454ab8c009ac688f6c62039117742 (diff) | |
download | pleroma-bb02ee99f58e378e33162211f41fe5979d5da8ae.tar.gz |
CommonFixes: more predictable context generation
`context` fields for objects and activities can now be generated based
on the object/activity `inReplyTo` field or its ActivityPub ID, as a
fallback method in cases where `context` fields are missing for incoming
activities and objects.
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/http_request_mock.ex | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index c1f0f7af1..7f6065579 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -1084,6 +1084,14 @@ defmodule HttpRequestMock do }} end + def get("https://404.site" <> _, _, _, _) do + {:ok, + %Tesla.Env{ + status: 404, + body: "" + }} + end + def get( "https://zetsubou.xn--q9jyb4c/.well-known/webfinger?resource=acct:lain@zetsubou.xn--q9jyb4c", _, @@ -1428,6 +1436,15 @@ defmodule HttpRequestMock do }} end + def get("https://mk.absturztau.be/notes/93e7nm8wqg/activity", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/mk.absturztau.be-93e7nm8wqg-activity.json"), + headers: activitypub_object_headers() + }} + end + def get("https://p.helene.moe/objects/fd5910ac-d9dc-412e-8d1d-914b203296c4", _, _, _) do {:ok, %Tesla.Env{ |