projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Render AKAs in Actor endpoints
[akkoma]
/
test
/
pleroma
/
web
/
activity_pub
/
activity_pub_controller_test.exs
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 b577e25ddb7702994dfbb997571fb1e5a5d9d4ca..0063d048298b8f6a15d3d738fbbff7125f21d492 100644
(file)
--- a/
test/pleroma/web/activity_pub/activity_pub_controller_test.exs
+++ b/
test/pleroma/web/activity_pub/activity_pub_controller_test.exs
@@
-431,7
+431,7
@@
defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
describe "/inbox" do
test "it inserts an incoming activity into the database", %{conn: conn} do
describe "/inbox" do
test "it inserts an incoming activity into the database", %{conn: conn} do
- data = File.read!("test/fixtures/mastodon-post-activity.json") |>
Poi
son.decode!()
+ data = File.read!("test/fixtures/mastodon-post-activity.json") |>
Ja
son.decode!()
conn =
conn
conn =
conn
@@
-459,7
+459,7
@@
defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
data =
File.read!("test/fixtures/mastodon-post-activity.json")
data =
File.read!("test/fixtures/mastodon-post-activity.json")
- |>
Poi
son.decode!()
+ |>
Ja
son.decode!()
|> Map.put("actor", user.ap_id)
|> put_in(["object", "attridbutedTo"], user.ap_id)
|> Map.put("actor", user.ap_id)
|> put_in(["object", "attridbutedTo"], user.ap_id)
@@
-476,7
+476,7
@@
defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
end
test "it clears `unreachable` federation status of the sender", %{conn: conn} do
end
test "it clears `unreachable` federation status of the sender", %{conn: conn} do
- data = File.read!("test/fixtures/mastodon-post-activity.json") |>
Poi
son.decode!()
+ data = File.read!("test/fixtures/mastodon-post-activity.json") |>
Ja
son.decode!()
sender_url = data["actor"]
Instances.set_consistently_unreachable(sender_url)
sender_url = data["actor"]
Instances.set_consistently_unreachable(sender_url)
@@
-534,8
+534,8
@@
defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
test "without valid signature, " <>
"it only accepts Create activities and requires enabled federation",
%{conn: conn} do
test "without valid signature, " <>
"it only accepts Create activities and requires enabled federation",
%{conn: conn} do
- data = File.read!("test/fixtures/mastodon-post-activity.json") |>
Poi
son.decode!()
- non_create_data = File.read!("test/fixtures/mastodon-announce.json") |>
Poi
son.decode!()
+ data = File.read!("test/fixtures/mastodon-post-activity.json") |>
Ja
son.decode!()
+ non_create_data = File.read!("test/fixtures/mastodon-announce.json") |>
Ja
son.decode!()
conn = put_req_header(conn, "content-type", "application/activity+json")
conn = put_req_header(conn, "content-type", "application/activity+json")
@@
-564,7
+564,7
@@
defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
setup do
data =
File.read!("test/fixtures/mastodon-post-activity.json")
setup do
data =
File.read!("test/fixtures/mastodon-post-activity.json")
- |>
Poi
son.decode!()
+ |>
Ja
son.decode!()
[data: data]
end
[data: data]
end
@@
-675,7
+675,7
@@
defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
recipient = insert(:user)
actor = insert(:user, %{ap_id: "http://mastodon.example.org/users/actor"})
recipient = insert(:user)
actor = insert(:user, %{ap_id: "http://mastodon.example.org/users/actor"})
- {:ok, recipient} = User.follow(recipient, actor)
+ {:ok, recipient
, actor
} = User.follow(recipient, actor)
object =
data["object"]
object =
data["object"]
@@
-747,7
+747,7
@@
defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
data =
File.read!("test/fixtures/activitypub-client-post-activity.json")
data =
File.read!("test/fixtures/activitypub-client-post-activity.json")
- |>
Poi
son.decode!()
+ |>
Ja
son.decode!()
object = Map.put(data["object"], "attributedTo", actor.ap_id)
object = Map.put(data["object"], "attributedTo", actor.ap_id)