Merge branch 'fix_eratic_test_for_report_notes' into 'develop'
Fix eratic test for POST /api/pleroma/admin/reports/:id/notes See merge request pleroma/pleroma!3653
This commit is contained in:
commit
a5d7e98de0
@ -355,7 +355,6 @@ defmodule Pleroma.Web.AdminAPI.ReportControllerTest do
|
|||||||
} = note
|
} = note
|
||||||
end
|
end
|
||||||
|
|
||||||
@tag :erratic
|
|
||||||
test "it returns reports with notes", %{conn: conn, admin: admin} do
|
test "it returns reports with notes", %{conn: conn, admin: admin} do
|
||||||
conn = get(conn, "/api/pleroma/admin/reports")
|
conn = get(conn, "/api/pleroma/admin/reports")
|
||||||
|
|
||||||
@ -364,7 +363,8 @@ defmodule Pleroma.Web.AdminAPI.ReportControllerTest do
|
|||||||
[note, _] = notes
|
[note, _] = notes
|
||||||
|
|
||||||
assert note["user"]["nickname"] == admin.nickname
|
assert note["user"]["nickname"] == admin.nickname
|
||||||
assert note["content"] == "this is disgusting!"
|
# We use '=~' because the order of the notes isn't guaranteed
|
||||||
|
assert note["content"] =~ "this is disgusting"
|
||||||
assert note["created_at"]
|
assert note["created_at"]
|
||||||
assert response["total"] == 1
|
assert response["total"] == 1
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user