aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/users_mock/user.json1
-rw-r--r--test/pleroma/web/activity_pub/activity_pub_controller_test.exs22
-rw-r--r--test/pleroma/web/activity_pub/transmogrifier_test.exs11
3 files changed, 34 insertions, 0 deletions
diff --git a/test/fixtures/users_mock/user.json b/test/fixtures/users_mock/user.json
index da2483d02..c722a1145 100644
--- a/test/fixtures/users_mock/user.json
+++ b/test/fixtures/users_mock/user.json
@@ -34,6 +34,7 @@
"owner": "https://example.com/users/{{nickname}}",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5DLtwGXNZElJyxFGfcVc\nXANhaMadj/iYYQwZjOJTV9QsbtiNBeIK54PJrYuU0/0YIdrvS1iqheX5IwXRhcwa\nhm3ZyLz7XeN9st7FBni4BmZMBtMpxAuYuu5p/jbWy13qAiYOhPreCx0wrWgm/lBD\n9mkgaxIxPooBE0S4ZWEJIDIV1Vft3AWcRUyWW1vIBK0uZzs6GYshbQZB952S0yo4\nFzI1hABGHncH8UvuFauh4EZ8tY7/X5I0pGRnDOcRN1dAht5w5yTA+6r5kebiFQjP\nIzN/eCO/a9Flrj9YGW7HDNtjSOH0A31PLRGlJtJO3yK57dnf5ppyCZGfL4emShQo\ncQIDAQAB\n-----END PUBLIC KEY-----\n\n"
},
+ "featured": "https://example.com/users/{{nickname}}/collections/featured",
"summary": "your friendly neighborhood pleroma developer<br>I like cute things and distributed systems, and really hate delete and redrafts",
"tag": [],
"type": "Person",
diff --git a/test/pleroma/web/activity_pub/activity_pub_controller_test.exs b/test/pleroma/web/activity_pub/activity_pub_controller_test.exs
index d9fa25d94..cea4b3a97 100644
--- a/test/pleroma/web/activity_pub/activity_pub_controller_test.exs
+++ b/test/pleroma/web/activity_pub/activity_pub_controller_test.exs
@@ -673,6 +673,17 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
body: user,
headers: [{"content-type", "application/activity+json"}]
}
+
+ %{method: :get, url: "https://example.com/users/lain/collections/featured"} ->
+ %Tesla.Env{
+ status: 200,
+ body:
+ "test/fixtures/users_mock/masto_featured.json"
+ |> File.read!()
+ |> String.replace("{{domain}}", "example.com")
+ |> String.replace("{{nickname}}", "lain"),
+ headers: [{"content-type", "application/activity+json"}]
+ }
end)
data = %{
@@ -753,6 +764,17 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
body: user,
headers: [{"content-type", "application/activity+json"}]
}
+
+ %{method: :get, url: "https://example.com/users/lain/collections/featured"} ->
+ %Tesla.Env{
+ status: 200,
+ body:
+ "test/fixtures/users_mock/masto_featured.json"
+ |> File.read!()
+ |> String.replace("{{domain}}", "example.com")
+ |> String.replace("{{nickname}}", "lain"),
+ headers: [{"content-type", "application/activity+json"}]
+ }
end)
data = %{
diff --git a/test/pleroma/web/activity_pub/transmogrifier_test.exs b/test/pleroma/web/activity_pub/transmogrifier_test.exs
index 9bc27f89e..fb8284aaf 100644
--- a/test/pleroma/web/activity_pub/transmogrifier_test.exs
+++ b/test/pleroma/web/activity_pub/transmogrifier_test.exs
@@ -147,6 +147,17 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
body: object,
headers: [{"content-type", "application/activity+json"}]
}
+
+ %{method: :get, url: "https://example.com/users/lain/collections/featured"} ->
+ %Tesla.Env{
+ status: 200,
+ body:
+ "test/fixtures/users_mock/masto_featured.json"
+ |> File.read!()
+ |> String.replace("{{domain}}", "example.com")
+ |> String.replace("{{nickname}}", "lain"),
+ headers: [{"content-type", "application/activity+json"}]
+ }
end)
message = %{