diff options
| author | KZ <kenneth.zhao@gmail.com> | 2019-02-22 04:37:48 +0000 | 
|---|---|---|
| committer | kaniini <nenolod@gmail.com> | 2019-02-22 04:37:48 +0000 | 
| commit | 7c722c08f5fa44fc5d1baf0eb0fabb32942988a2 (patch) | |
| tree | 6223c6bc4bd364c3b640ae7a66a250111933019f /test | |
| parent | 2813f28b6fa1618efb01f4bd570e055ca16efbc5 (diff) | |
| download | pleroma-7c722c08f5fa44fc5d1baf0eb0fabb32942988a2.tar.gz pleroma-7c722c08f5fa44fc5d1baf0eb0fabb32942988a2.zip | |
Fix: Fixing an outbox related bug when local user activity is empty
Diffstat (limited to 'test')
| -rw-r--r-- | test/web/activity_pub/activity_pub_controller_test.exs | 12 | 
1 files changed, 12 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 a809c15b1..6bd4493f5 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -304,6 +304,18 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do    end    describe "/users/:nickname/outbox" do +    test "it will not bomb when there is no activity", %{conn: conn} do +      user = insert(:user) + +      conn = +        conn +        |> put_req_header("accept", "application/activity+json") +        |> get("/users/#{user.nickname}/outbox") + +      result = json_response(conn, 200) +      assert user.ap_id <> "/outbox" == result["id"] +    end +      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"]) | 
