diff options
| author | lambda <pleromagit@rogerbraun.net> | 2019-03-03 11:13:59 +0000 | 
|---|---|---|
| committer | lambda <pleromagit@rogerbraun.net> | 2019-03-03 11:13:59 +0000 | 
| commit | 9b63fda9c70f0fd3030ada951f3514221ae2e3aa (patch) | |
| tree | 9b05392395a23e768b6d7bab61968355549dd8eb /test/web/twitter_api | |
| parent | f38c316e6edbc88f1808a0c39488231ce17e4f35 (diff) | |
| parent | 9c6abec4d8b2487edeb124aa197a5dd6d771e345 (diff) | |
| download | pleroma-9b63fda9c70f0fd3030ada951f3514221ae2e3aa.tar.gz pleroma-9b63fda9c70f0fd3030ada951f3514221ae2e3aa.zip | |
Merge branch 'fix/dont-show-dms-in-mentions-timeline' into 'develop'
[#675] Do not show DMs in mentions timeline
See merge request pleroma/pleroma!877
Diffstat (limited to 'test/web/twitter_api')
| -rw-r--r-- | test/web/twitter_api/twitter_api_controller_test.exs | 22 | 
1 files changed, 21 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..7125d85ab 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}) +        CommonAPI.post(current_user, %{ +          "status" => "why is tenshi eating a corndog so cute?", +          "visibility" => "public" +        })        conn =          conn @@ -445,6 +448,23 @@ 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} = +        CommonAPI.post(current_user, %{ +          "status" => "Have you guys ever seen how cute tenshi eating a corndog is?", +          "visibility" => "direct" +        }) + +      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 | 
