diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-09-10 01:11:57 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-09-10 01:11:57 +0700 |
commit | e0f84d0043d922f7cc88875a0bc52f2db8972b76 (patch) | |
tree | d59bb21a3c20feb54ebe9b8f5311f0809f3fac18 /test | |
parent | 896ffabe37406e85c2a3c2f30d2e882c68b5831e (diff) | |
download | pleroma-e0f84d0043d922f7cc88875a0bc52f2db8972b76.tar.gz |
Fix `ActivityPubController.read_inbox/2`
Diffstat (limited to 'test')
-rw-r--r-- | test/web/activity_pub/activity_pub_controller_test.exs | 11 |
1 files changed, 11 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 5192e734f..4388538c2 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -365,6 +365,17 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do assert json_response(conn, 403) end + test "it doesn't crash without an authenticated user", %{conn: conn} do + user = insert(:user) + + conn = + conn + |> put_req_header("accept", "application/activity+json") + |> get("/users/#{user.nickname}/inbox") + + assert json_response(conn, 403) + end + test "it returns a note activity in a collection", %{conn: conn} do note_activity = insert(:direct_note_activity) note_object = Object.normalize(note_activity) |