diff options
author | Maxim Filippov <colixer@gmail.com> | 2019-12-06 17:17:24 +0900 |
---|---|---|
committer | Maxim Filippov <colixer@gmail.com> | 2019-12-06 17:17:24 +0900 |
commit | 08c89fd2b89614baaf4bfce067cfec9db96f2d2c (patch) | |
tree | 5e7e609ffcfbf1470e87949549571a2537396816 /test/web/admin_api/admin_api_controller_test.exs | |
parent | 4453a9cb73ce80b8640f47f5222085f0507c2cfb (diff) | |
download | pleroma-08c89fd2b89614baaf4bfce067cfec9db96f2d2c.tar.gz pleroma-08c89fd2b89614baaf4bfce067cfec9db96f2d2c.zip |
Fix incorrect report count
Diffstat (limited to 'test/web/admin_api/admin_api_controller_test.exs')
-rw-r--r-- | test/web/admin_api/admin_api_controller_test.exs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs index 453c290e4..2a3e49af8 100644 --- a/test/web/admin_api/admin_api_controller_test.exs +++ b/test/web/admin_api/admin_api_controller_test.exs @@ -2940,11 +2940,13 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do end test "it creates report note", %{admin_id: admin_id, report_id: report_id} do + [note, _] = Repo.all(Pleroma.ReportNote) + assert %{ activity_id: ^report_id, content: "this is disgusting!", user_id: ^admin_id - } = Repo.one(Pleroma.ReportNote) + } = note end test "it returns reports with notes", %{admin: admin} do @@ -2959,6 +2961,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do assert note["user"]["nickname"] == admin.nickname assert note["content"] == "this is disgusting!" + assert note["created_at"] assert response["total"] == 1 end end |