diff options
author | lain <lain@soykaf.club> | 2020-07-23 12:52:02 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-07-23 12:52:02 +0000 |
commit | 76aa49a0c5be0d1d51e99fd30683b12c8edc653d (patch) | |
tree | 5d7942ba21ad06f7a85ecfc3349d3351d59c32cf /test/web/admin_api | |
parent | b2ba70eec437e81b8c1c2be3081858be38a73c61 (diff) | |
parent | 9ea51a6de516b37341a9566d11d0110c2d87c1b6 (diff) | |
download | pleroma-76aa49a0c5be0d1d51e99fd30683b12c8edc653d.tar.gz pleroma-76aa49a0c5be0d1d51e99fd30683b12c8edc653d.zip |
Merge branch '1973-chats-fix-with-restrict-unauthenticated' into 'develop'
[#1973] Fixed accounts rendering in GET /api/v1/pleroma/chats with truish :restrict_unauthenticated setting
Closes #1973
See merge request pleroma/pleroma!2791
Diffstat (limited to 'test/web/admin_api')
-rw-r--r-- | test/web/admin_api/views/report_view_test.exs | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/test/web/admin_api/views/report_view_test.exs b/test/web/admin_api/views/report_view_test.exs index f00b0afb2..5a02292be 100644 --- a/test/web/admin_api/views/report_view_test.exs +++ b/test/web/admin_api/views/report_view_test.exs @@ -4,11 +4,14 @@ defmodule Pleroma.Web.AdminAPI.ReportViewTest do use Pleroma.DataCase + import Pleroma.Factory + + alias Pleroma.Web.AdminAPI alias Pleroma.Web.AdminAPI.Report alias Pleroma.Web.AdminAPI.ReportView alias Pleroma.Web.CommonAPI - alias Pleroma.Web.MastodonAPI.AccountView + alias Pleroma.Web.MastodonAPI alias Pleroma.Web.MastodonAPI.StatusView test "renders a report" do @@ -21,13 +24,16 @@ defmodule Pleroma.Web.AdminAPI.ReportViewTest do content: nil, actor: Map.merge( - AccountView.render("show.json", %{user: user}), - Pleroma.Web.AdminAPI.AccountView.render("show.json", %{user: user}) + MastodonAPI.AccountView.render("show.json", %{user: user, skip_visibility_check: true}), + AdminAPI.AccountView.render("show.json", %{user: user}) ), account: Map.merge( - AccountView.render("show.json", %{user: other_user}), - Pleroma.Web.AdminAPI.AccountView.render("show.json", %{user: other_user}) + MastodonAPI.AccountView.render("show.json", %{ + user: other_user, + skip_visibility_check: true + }), + AdminAPI.AccountView.render("show.json", %{user: other_user}) ), statuses: [], notes: [], @@ -56,13 +62,16 @@ defmodule Pleroma.Web.AdminAPI.ReportViewTest do content: nil, actor: Map.merge( - AccountView.render("show.json", %{user: user}), - Pleroma.Web.AdminAPI.AccountView.render("show.json", %{user: user}) + MastodonAPI.AccountView.render("show.json", %{user: user, skip_visibility_check: true}), + AdminAPI.AccountView.render("show.json", %{user: user}) ), account: Map.merge( - AccountView.render("show.json", %{user: other_user}), - Pleroma.Web.AdminAPI.AccountView.render("show.json", %{user: other_user}) + MastodonAPI.AccountView.render("show.json", %{ + user: other_user, + skip_visibility_check: true + }), + AdminAPI.AccountView.render("show.json", %{user: other_user}) ), statuses: [StatusView.render("show.json", %{activity: activity})], state: "open", |