diff options
| author | lain <lain@soykaf.club> | 2020-07-06 12:07:56 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-07-06 12:07:56 +0200 |
| commit | ed4f9f6a29d8cf2dd31e41bae7e63aaa15bc9548 (patch) | |
| tree | 82c5e8b4a40495485533b9c95668cef39ce909d2 /test/web/mastodon_api/views | |
| parent | a5bbfa21a1fabe97bfff1cc80348d2944319f3ad (diff) | |
| parent | 69f0b286f7b3e0518ac7ae54dfb06539dc179698 (diff) | |
| download | pleroma-ed4f9f6a29d8cf2dd31e41bae7e63aaa15bc9548.tar.gz pleroma-ed4f9f6a29d8cf2dd31e41bae7e63aaa15bc9548.zip | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into 1507-static-fe-prioritize-json
Diffstat (limited to 'test/web/mastodon_api/views')
| -rw-r--r-- | test/web/mastodon_api/views/status_view_test.exs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs index 5cbadf0fc..fa26b3129 100644 --- a/test/web/mastodon_api/views/status_view_test.exs +++ b/test/web/mastodon_api/views/status_view_test.exs @@ -183,6 +183,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do card: nil, reblog: nil, content: HTML.filter_tags(object_data["content"]), + text: nil, created_at: created_at, reblogs_count: 0, replies_count: 0, @@ -226,7 +227,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 +622,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 |
