aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhakabahitoyo <hakabahitoyo@example.com>2018-07-21 01:44:35 +0900
committerhakabahitoyo <hakabahitoyo@example.com>2018-07-21 01:44:35 +0900
commit9c2afb2e71d7ed072fbb43e2ef002e0d629ca877 (patch)
tree590e5a091082091689160137b6415fdbaf01b9ac
parente90b734f1c41c13e08b7461f5bfb42745ea7ba08 (diff)
downloadpleroma-9c2afb2e71d7ed072fbb43e2ef002e0d629ca877.tar.gz
improve test
-rw-r--r--test/web/activity_pub/activity_pub_controller_test.exs14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs
index 25b47ee31..b9294efe1 100644
--- a/test/web/activity_pub/activity_pub_controller_test.exs
+++ b/test/web/activity_pub/activity_pub_controller_test.exs
@@ -50,6 +50,20 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
end
end
+ describe "/users/:nickname/outbox" do
+ test "it returns a note action in a collection", %{conn: conn} do
+ note_activity = insert(:note_activity)
+ user = User.get_cached_by_ap_id(note_activity.data["actor"])
+
+ conn =
+ conn
+ |> put_req_header("Accept", "application/activity+json")
+ |> get("/users/#{user.nickname}/outbox")
+
+ assert response(conn, 200) =~ note_activity.data["object"]["content"]
+ end
+ end
+
describe "/users/:nickname/followers" do
test "it returns the followers in a collection", %{conn: conn} do
user = insert(:user)