diff options
author | tusooa <tusooa@kazv.moe> | 2023-01-26 20:17:13 -0500 |
---|---|---|
committer | tusooa <tusooa@kazv.moe> | 2023-02-20 12:25:00 -0500 |
commit | 1c225bfd6e86b58d2a70eb74d3774a438dc7796b (patch) | |
tree | 5762b0dc52aeefa3791683b523ac6fee90c04043 /test | |
parent | 1b82fd95d414a411f4aaae125c66c8df53f84f21 (diff) | |
download | pleroma-1c225bfd6e86b58d2a70eb74d3774a438dc7796b.tar.gz pleroma-1c225bfd6e86b58d2a70eb74d3774a438dc7796b.zip |
Allow customizing instance languages
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs index 13e3ffc0a..a556ef6a8 100644 --- a/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs @@ -92,4 +92,18 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do assert ["peer1.com", "peer2.com"] == Enum.sort(result) end + + test "instance languages", %{conn: conn} do + assert %{"languages" => ["en"]} = + conn + |> get("/api/v1/instance") + |> json_response_and_validate_schema(200) + + clear_config([:instance, :languages], ["aa", "bb"]) + + assert %{"languages" => ["aa", "bb"]} = + conn + |> get("/api/v1/instance") + |> json_response_and_validate_schema(200) + end end |