config descriptions for custom MRF policies

This commit is contained in:
Alexander Strizhakov 2020-11-10 19:18:53 +03:00
commit 485697d96c
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
16 changed files with 412 additions and 305 deletions

View file

@ -87,4 +87,21 @@ defmodule Pleroma.Web.ActivityPub.MRFTest do
{:ok, ^expected} = MRF.describe()
end
end
test "config_descriptions/0" do
descriptions = MRF.config_descriptions()
good_mrf = Enum.find(descriptions, fn %{key: key} -> key == :good_mrf end)
assert good_mrf == %{
key: :good_mrf,
related_policy: "Fixtures.Modules.GoodMRF",
label: "Good MRF",
description: "Some description",
children: [],
group: :pleroma,
tab: :mrf,
type: :group
}
end
end