diff options
author | sxsdv1 <sxsdv1@gmail.com> | 2018-12-29 18:15:28 +0100 |
---|---|---|
committer | sxsdv1 <sxsdv1@gmail.com> | 2018-12-30 12:01:39 +0100 |
commit | 26dc2dddab6103a3e6e44a3c7ba097283302fc2a (patch) | |
tree | 58439204936bfbf90eb94445740ab3d5e895db6b /test | |
parent | aa082ca7b6a64f6cfd509118f76a5c18492e07b9 (diff) | |
download | pleroma-26dc2dddab6103a3e6e44a3c7ba097283302fc2a.tar.gz |
Implement ActivityPub inbox view
More or less verbatim copied from the outbox template with only changes
to the activities fetched and url reported
Diffstat (limited to 'test')
-rw-r--r-- | test/web/activity_pub/activity_pub_controller_test.exs | 13 |
1 files changed, 13 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 95027f855..589645dd6 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -125,6 +125,19 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do assert json_response(conn, 403) end + + test "it returns a note activity in a collection", %{conn: conn} do + note_activity = insert(:direct_note_activity) + user = User.get_cached_by_ap_id(hd(note_activity.data["to"])) + + conn = + conn + |> assign(:user, user) + |> put_req_header("accept", "application/activity+json") + |> get("/users/#{user.nickname}/inbox") + + assert response(conn, 200) =~ note_activity.data["object"]["content"] + end end describe "/users/:nickname/outbox" do |