diff options
| author | Alex Gleason <alex@alexgleason.me> | 2020-08-05 13:08:31 -0500 |
|---|---|---|
| committer | Alex Gleason <alex@alexgleason.me> | 2020-08-05 13:08:31 -0500 |
| commit | cc196e2cd57966889021342405ebc8fd0763e83a (patch) | |
| tree | 232051460624a0fd0720ed04cc5512208ce1989b /test/web/admin_api/views | |
| parent | ad9c925efb77287316f5dbac26f6a1b16662910a (diff) | |
| parent | 7755f49e281e4990db5317b33d6b8e0d12982e0c (diff) | |
| download | pleroma-cc196e2cd57966889021342405ebc8fd0763e83a.tar.gz pleroma-cc196e2cd57966889021342405ebc8fd0763e83a.zip | |
Merge remote-tracking branch 'upstream/develop' into restrict-domain
Diffstat (limited to 'test/web/admin_api/views')
| -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", |
