summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-01-18 22:40:52 +0300
committerMaxim Filippov <colixer@gmail.com>2019-01-18 22:40:52 +0300
commite116e55cabb34d468866231d1690421792c27a0c (patch)
treea2177c938c2d139b5f0e8859737e6d46719fcde8 /test
parent9a444c0d22fc935c0e268c10d32c847125fd3627 (diff)
downloadpleroma-e116e55cabb34d468866231d1690421792c27a0c.tar.gz
pleroma-e116e55cabb34d468866231d1690421792c27a0c.zip
Add actor to recipients
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index fe8f845c7..ce3aa5a02 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -181,6 +181,16 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
assert %{"visibility" => "direct"} = status
assert status["url"] != direct.data["id"]
+ # User should be able to see his own direct message
+ res_conn =
+ build_conn()
+ |> assign(:user, user_one)
+ |> get("api/v1/timelines/direct")
+
+ [status] = json_response(res_conn, 200)
+
+ assert %{"visibility" => "direct"} = status
+
# Both should be visible here
res_conn =
conn