diff options
author | Maxim Filippov <colixer@gmail.com> | 2019-10-18 10:24:29 +0200 |
---|---|---|
committer | Maxim Filippov <colixer@gmail.com> | 2019-10-18 10:24:29 +0200 |
commit | 2473702be22a44070fcff439ac901f5b9bb0586a (patch) | |
tree | 31b6180315fad80c41f551adf3ece4dcebf71f74 /test/web/mastodon_api/controllers/account_controller_test.exs | |
parent | 751513b6df0c76ad14026c70e1bf2635053bfea4 (diff) | |
parent | 7511f3d192bff285d0ca22c03cd9a46fd552cdde (diff) | |
download | pleroma-2473702be22a44070fcff439ac901f5b9bb0586a.tar.gz pleroma-2473702be22a44070fcff439ac901f5b9bb0586a.zip |
Merge branch 'develop' into feature/relay-list
Diffstat (limited to 'test/web/mastodon_api/controllers/account_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/account_controller_test.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs index 6a59c3d94..745383757 100644 --- a/test/web/mastodon_api/controllers/account_controller_test.exs +++ b/test/web/mastodon_api/controllers/account_controller_test.exs @@ -237,6 +237,20 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do assert [%{"id" => id}] = json_response(conn, 200) assert id == to_string(post.id) end + + test "the user views their own timelines and excludes direct messages", %{conn: conn} do + user = insert(:user) + {:ok, public_activity} = CommonAPI.post(user, %{"status" => ".", "visibility" => "public"}) + {:ok, _direct_activity} = CommonAPI.post(user, %{"status" => ".", "visibility" => "direct"}) + + conn = + conn + |> assign(:user, user) + |> get("/api/v1/accounts/#{user.id}/statuses", %{"exclude_visibilities" => ["direct"]}) + + assert [%{"id" => id}] = json_response(conn, 200) + assert id == to_string(public_activity.id) + end end describe "followers" do |