diff options
author | rinpatch <rinpatch@sdf.org> | 2019-03-01 09:37:29 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-03-01 09:37:29 +0300 |
commit | 1341ee650ecde656f385454264f43b21051e86f2 (patch) | |
tree | 1571972f33fcff79510935a3b0235ed65ff49ba7 /test/web/twitter_api | |
parent | 1c265b3b19bacd2e0a9ccfee0f7e53a59d83a621 (diff) | |
download | pleroma-1341ee650ecde656f385454264f43b21051e86f2.tar.gz |
[#675] Do not show DMs in mentions timeline
Diffstat (limited to 'test/web/twitter_api')
-rw-r--r-- | test/web/twitter_api/twitter_api_controller_test.exs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs index 05a832967..ed5683779 100644 --- a/test/web/twitter_api/twitter_api_controller_test.exs +++ b/test/web/twitter_api/twitter_api_controller_test.exs @@ -427,7 +427,10 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do test "with credentials", %{conn: conn, user: current_user} do {:ok, activity} = - ActivityBuilder.insert(%{"to" => [current_user.ap_id]}, %{user: current_user}) + ActivityBuilder.insert( + %{"to" => [current_user.ap_id, "https://www.w3.org/ns/activitystreams#Public"]}, + %{user: current_user} + ) conn = conn @@ -445,6 +448,20 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do mentioned: [current_user] }) end + + test "does not show DMs in mentions timeline", %{conn: conn, user: current_user} do + {:ok, _activity} = + ActivityBuilder.insert(%{"to" => [current_user.ap_id]}, %{user: current_user}) + + conn = + conn + |> with_credentials(current_user.nickname, "test") + |> get("/api/statuses/mentions.json") + + response = json_response(conn, 200) + + assert length(response) == 0 + end end describe "GET /api/qvitter/statuses/notifications.json" do |