aboutsummaryrefslogtreecommitdiff
path: root/test/web
diff options
context:
space:
mode:
authorhakabahitoyo <hakabahitoyo@example.com>2018-07-21 02:57:56 +0900
committerhakabahitoyo <hakabahitoyo@example.com>2018-07-21 02:57:56 +0900
commit9c1b6f11c501756362342b5652769c9dfd12e77c (patch)
treed8e559301d776660395b68aa54b6f137e3160acf /test/web
parent908cefd84a6cf9bddd04ad9521be2ff5b7d8f379 (diff)
downloadpleroma-9c1b6f11c501756362342b5652769c9dfd12e77c.tar.gz
improve test
Diffstat (limited to 'test/web')
-rw-r--r--test/web/activity_pub/activity_pub_controller_test.exs14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs
index 1daa5627c..8a1c0d361 100644
--- a/test/web/activity_pub/activity_pub_controller_test.exs
+++ b/test/web/activity_pub/activity_pub_controller_test.exs
@@ -51,7 +51,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
end
describe "/users/:nickname/outbox" do
- test "it returns a note action in a collection", %{conn: conn} do
+ test "it returns a note activity in a collection", %{conn: conn} do
note_activity = insert(:note_activity)
user = User.get_cached_by_ap_id(note_activity.data["actor"])
@@ -62,6 +62,18 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
assert response(conn, 200) =~ note_activity.data["object"]["content"]
end
+
+ test "it returns an announce activity in a collection", %{conn: conn} do
+ announce_activity = insert(:announce_activity)
+ user = User.get_cached_by_ap_id(announce_activity.data["actor"])
+
+ conn =
+ conn
+ |> put_req_header("accept", "application/activity+json")
+ |> get("/users/#{user.nickname}/outbox")
+
+ assert response(conn, 200) =~ announce_activity.data["object"]
+ end
end
describe "/users/:nickname/followers" do