summaryrefslogtreecommitdiff
path: root/test/web/admin_api/admin_api_controller_test.exs
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-11-26 01:06:54 +0900
committerMaxim Filippov <colixer@gmail.com>2019-11-26 01:06:54 +0900
commit5869a43fe722c878fca1d87816cd1437f2bb49fe (patch)
tree5f5ad26e2bdaae3156a43af565a4935f5d388220 /test/web/admin_api/admin_api_controller_test.exs
parentb62be2564c1b3e33e51628e980c5d1ebe259475f (diff)
downloadpleroma-5869a43fe722c878fca1d87816cd1437f2bb49fe.tar.gz
pleroma-5869a43fe722c878fca1d87816cd1437f2bb49fe.zip
Fix tests
Diffstat (limited to 'test/web/admin_api/admin_api_controller_test.exs')
-rw-r--r--test/web/admin_api/admin_api_controller_test.exs19
1 files changed, 7 insertions, 12 deletions
diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs
index 12dba7773..c6ff1a065 100644
--- a/test/web/admin_api/admin_api_controller_test.exs
+++ b/test/web/admin_api/admin_api_controller_test.exs
@@ -1654,9 +1654,10 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
NaiveDateTime.from_iso8601!(act.data["published"])
end).data["published"]
- assert first_group["status"] == StatusView.render("show.json", %{activity: first_status})
+ assert first_group["status"] ==
+ stringify_keys(StatusView.render("show.json", %{activity: first_status}))
- assert first_group["account"]["id"] == target_user.id
+ assert(first_group["account"]["id"] == target_user.id)
assert length(first_group["actors"]) == 1
assert hd(first_group["actors"])["id"] == reporter.id
@@ -1669,11 +1670,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
NaiveDateTime.from_iso8601!(act.data["published"])
end).data["published"]
- assert second_group["status"] == %{
- "id" => second_status.data["id"],
- "content" => second_status.object.data["content"],
- "published" => second_status.object.data["published"]
- }
+ assert second_group["status"] ==
+ stringify_keys(StatusView.render("show.json", %{activity: second_status}))
assert second_group["account"]["id"] == target_user.id
@@ -1688,11 +1686,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
NaiveDateTime.from_iso8601!(act.data["published"])
end).data["published"]
- assert third_group["status"] == %{
- "id" => third_status.data["id"],
- "content" => third_status.object.data["content"],
- "published" => third_status.object.data["published"]
- }
+ assert third_group["status"] ==
+ stringify_keys(StatusView.render("show.json", %{activity: third_status}))
assert third_group["account"]["id"] == target_user.id