Commit b0f7d1ce authored by marcin mikołajczak's avatar marcin mikołajczak
Browse files

InstanceControllerTest: Add configuration test



Signed-off-by: marcin mikołajczak's avatarmarcin mikołajczak <git@mkljczk.pl>
parent bf58230c
Pipeline #39915 passed with stages
in 19 minutes and 14 seconds
......@@ -146,7 +146,7 @@ defmodule Pleroma.Web.ApiSpec.InstanceOperation do
max_media_attachments: %Schema{
type: :integer,
description: "Media attachment limit"
},
}
}
},
media_attachments: %Schema{
......
......@@ -91,4 +91,14 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do
assert ["peer1.com", "peer2.com"] == Enum.sort(result)
end
test "get instance configuration", %{conn: conn} do
clear_config([:instance, :limit], 476)
conn = get(conn, "/api/v1/instance")
assert result = json_response_and_validate_schema(conn, 200)
assert result["configuration"]["statuses"]["max_characters"] == 476
end
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment