1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-26 16:55:22 +01:00

node_info_test.exs: Add test on the default feature list

This commit is contained in:
Haelwenn (lanodan) Monnier 2020-03-24 20:21:27 +01:00
parent 7d275970ab
commit 64165d1df9
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE

View File

@ -128,6 +128,27 @@ defmodule Pleroma.Web.NodeInfoTest do
end
end
test "it shows default features flags", %{conn: conn} do
response =
conn
|> get("/nodeinfo/2.1.json")
|> json_response(:ok)
assert response["metadata"]["features"] --
[
"pleroma_api",
"mastodon_api",
"mastodon_api_streaming",
"polls",
"pleroma_explicit_addressing",
"shareable_emoji_packs",
"multifetch",
"chat",
"relay",
"pleroma_emoji_reactions"
] == []
end
test "it shows MRF transparency data if enabled", %{conn: conn} do
config = Pleroma.Config.get([:instance, :rewrite_policy])
Pleroma.Config.put([:instance, :rewrite_policy], [Pleroma.Web.ActivityPub.MRF.SimplePolicy])