From 55b1430dabfd8acfab6cf15927ebb6e59639affe Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 18 Feb 2021 15:09:14 -0600 Subject: [PATCH] Test the output of the endpoint --- test/pleroma/web/admin_api/controllers/config_controller_test.exs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/pleroma/web/admin_api/controllers/config_controller_test.exs b/test/pleroma/web/admin_api/controllers/config_controller_test.exs index 578a4c914..e4227d5eb 100644 --- a/test/pleroma/web/admin_api/controllers/config_controller_test.exs +++ b/test/pleroma/web/admin_api/controllers/config_controller_test.exs @@ -1453,4 +1453,12 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do assert esshd["children"] end end + + test "GET /api/pleroma/admin/config/tabs", %{conn: conn} do + result = get(conn, "/api/pleroma/admin/config/tabs") |> json_response_and_validate_schema(200) + + assert length(result) > 0 + + assert Enum.any?(result, fn tab -> tab["label"] == "Instance" end) + end end