diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-07-02 09:57:57 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-07-02 09:57:57 -0500 |
commit | 6b5563ed2cdb0bff95fbc42ba0e4687c8ed1311d (patch) | |
tree | 3dfb2172f49f7ca21f9adaf945897d869de8786d /test/web/mastodon_api | |
parent | f89390110b6b601fc505e63c3e36516d7ca96f5c (diff) | |
parent | 4c044f62258b33a95b8281e1eb42a5e0ce47d42d (diff) | |
download | pleroma-6b5563ed2cdb0bff95fbc42ba0e4687c8ed1311d.tar.gz pleroma-6b5563ed2cdb0bff95fbc42ba0e4687c8ed1311d.zip |
Merge branch 'develop' into feature/1885-MRF-metadata
Diffstat (limited to 'test/web/mastodon_api')
-rw-r--r-- | test/web/mastodon_api/controllers/account_controller_test.exs | 1 | ||||
-rw-r--r-- | test/web/mastodon_api/views/status_view_test.exs | 19 |
2 files changed, 18 insertions, 2 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs index ebfcedd01..260ad2306 100644 --- a/test/web/mastodon_api/controllers/account_controller_test.exs +++ b/test/web/mastodon_api/controllers/account_controller_test.exs @@ -780,7 +780,6 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do assert %{"id" => _id, "muting" => true, "muting_notifications" => true} = conn - |> put_req_header("content-type", "application/json") |> post("/api/v1/accounts/#{other_user.id}/mute") |> json_response_and_validate_schema(200) diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs index 5cbadf0fc..f90a0c273 100644 --- a/test/web/mastodon_api/views/status_view_test.exs +++ b/test/web/mastodon_api/views/status_view_test.exs @@ -226,7 +226,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do expires_at: nil, direct_conversation_id: nil, thread_muted: false, - emoji_reactions: [] + emoji_reactions: [], + parent_visible: false } } @@ -620,4 +621,20 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do assert status.visibility == "list" end + + test "has a field for parent visibility" do + user = insert(:user) + poster = insert(:user) + + {:ok, invisible} = CommonAPI.post(poster, %{status: "hey", visibility: "private"}) + + {:ok, visible} = + CommonAPI.post(poster, %{status: "hey", visibility: "private", in_reply_to_id: invisible.id}) + + status = StatusView.render("show.json", activity: visible, for: user) + refute status.pleroma.parent_visible + + status = StatusView.render("show.json", activity: visible, for: poster) + assert status.pleroma.parent_visible + end end |