aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2019-09-09 18:21:29 +0000
committerfeld <feld@feld.me>2019-09-09 18:21:29 +0000
commitedbaf781763a05037c1567f6f1a3ac1d35d60de2 (patch)
tree5cb615b34f409c21fddc7d79a935dcaf5102f80c /test
parentc45013df8e53334bcc1afb8cd1df673c290037ee (diff)
parente0f84d0043d922f7cc88875a0bc52f2db8972b76 (diff)
downloadpleroma-edbaf781763a05037c1567f6f1a3ac1d35d60de2.tar.gz
Merge branch 'fix/read-inbox' into 'develop'
Fix `ActivityPubController.read_inbox/2` Closes #1248 See merge request pleroma/pleroma!1649
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/activity_pub_controller_test.exs11
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)