|
|
@ -9,6 +9,7 @@ defmodule Pleroma.Web.AdminAPI.ModerationLogViewTest do
|
|
|
|
describe "renders `report_note_delete` log messages" do
|
|
|
|
describe "renders `report_note_delete` log messages" do
|
|
|
|
setup do
|
|
|
|
setup do
|
|
|
|
log1 = %Pleroma.ModerationLog{
|
|
|
|
log1 = %Pleroma.ModerationLog{
|
|
|
|
|
|
|
|
id: 1,
|
|
|
|
data: %{
|
|
|
|
data: %{
|
|
|
|
"action" => "report_note_delete",
|
|
|
|
"action" => "report_note_delete",
|
|
|
|
"actor" => %{"id" => "A1I7G8", "nickname" => "admin", "type" => "user"},
|
|
|
|
"actor" => %{"id" => "A1I7G8", "nickname" => "admin", "type" => "user"},
|
|
|
@ -21,6 +22,7 @@ defmodule Pleroma.Web.AdminAPI.ModerationLogViewTest do
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
log2 = %Pleroma.ModerationLog{
|
|
|
|
log2 = %Pleroma.ModerationLog{
|
|
|
|
|
|
|
|
id: 2,
|
|
|
|
data: %{
|
|
|
|
data: %{
|
|
|
|
"action" => "report_note_delete",
|
|
|
|
"action" => "report_note_delete",
|
|
|
|
"actor" => %{"id" => "A1I7G8", "nickname" => "admin", "type" => "user"},
|
|
|
|
"actor" => %{"id" => "A1I7G8", "nickname" => "admin", "type" => "user"},
|
|
|
@ -42,6 +44,7 @@ defmodule Pleroma.Web.AdminAPI.ModerationLogViewTest do
|
|
|
|
) == %{
|
|
|
|
) == %{
|
|
|
|
items: [
|
|
|
|
items: [
|
|
|
|
%{
|
|
|
|
%{
|
|
|
|
|
|
|
|
id: 1,
|
|
|
|
data: %{
|
|
|
|
data: %{
|
|
|
|
"action" => "report_note_delete",
|
|
|
|
"action" => "report_note_delete",
|
|
|
|
"actor" => %{"id" => "A1I7G8", "nickname" => "admin", "type" => "user"},
|
|
|
|
"actor" => %{"id" => "A1I7G8", "nickname" => "admin", "type" => "user"},
|
|
|
@ -59,6 +62,7 @@ defmodule Pleroma.Web.AdminAPI.ModerationLogViewTest do
|
|
|
|
time: 1_605_622_400
|
|
|
|
time: 1_605_622_400
|
|
|
|
},
|
|
|
|
},
|
|
|
|
%{
|
|
|
|
%{
|
|
|
|
|
|
|
|
id: 2,
|
|
|
|
data: %{
|
|
|
|
data: %{
|
|
|
|
"action" => "report_note_delete",
|
|
|
|
"action" => "report_note_delete",
|
|
|
|
"actor" => %{"id" => "A1I7G8", "nickname" => "admin", "type" => "user"},
|
|
|
|
"actor" => %{"id" => "A1I7G8", "nickname" => "admin", "type" => "user"},
|
|
|
@ -82,6 +86,7 @@ defmodule Pleroma.Web.AdminAPI.ModerationLogViewTest do
|
|
|
|
|
|
|
|
|
|
|
|
test "renders `report_note_delete` log message", %{log1: log} do
|
|
|
|
test "renders `report_note_delete` log message", %{log1: log} do
|
|
|
|
assert ModerationLogView.render("show.json", %{log_entry: log}) == %{
|
|
|
|
assert ModerationLogView.render("show.json", %{log_entry: log}) == %{
|
|
|
|
|
|
|
|
id: 1,
|
|
|
|
data: %{
|
|
|
|
data: %{
|
|
|
|
"action" => "report_note_delete",
|
|
|
|
"action" => "report_note_delete",
|
|
|
|
"actor" => %{"id" => "A1I7G8", "nickname" => "admin", "type" => "user"},
|
|
|
|
"actor" => %{"id" => "A1I7G8", "nickname" => "admin", "type" => "user"},
|
|
|
|