improve test
authorhakabahitoyo <hakabahitoyo@example.com>
Fri, 20 Jul 2018 16:44:35 +0000 (01:44 +0900)
committerhakabahitoyo <hakabahitoyo@example.com>
Fri, 20 Jul 2018 16:44:35 +0000 (01:44 +0900)
test/web/activity_pub/activity_pub_controller_test.exs

index 25b47ee31db4e3c32e9c91d698bded388de44542..b9294efe1c1e76b3b5362b362c3d289dda468da8 100644 (file)
@@ -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)