diff --git a/lib/pleroma/web/api_spec.ex b/lib/pleroma/web/api_spec.ex index 2d56dc6439..928e66a350 100644 --- a/lib/pleroma/web/api_spec.ex +++ b/lib/pleroma/web/api_spec.ex @@ -96,7 +96,16 @@ def spec(opts \\ []) do "Report managment", "Status administration", "User administration", - "Announcement management" + "Announcement management", + "Instance rule managment", + "Webhooks" + ] + }, + %{ + "name" => "Administration (MastoAPI)", + "tags" => [ + "User administration", + "Report methods" ] }, %{"name" => "Applications", "tags" => ["Applications", "Push subscriptions"]}, @@ -129,7 +138,8 @@ def spec(opts \\ []) do "Scheduled statuses", "Search", "Status actions", - "Media attachments" + "Media attachments", + "Event actions" ] }, %{ diff --git a/lib/pleroma/web/api_spec/operations/chat_operation.ex b/lib/pleroma/web/api_spec/operations/chat_operation.ex index 611e73bfb2..31292c4918 100644 --- a/lib/pleroma/web/api_spec/operations/chat_operation.ex +++ b/lib/pleroma/web/api_spec/operations/chat_operation.ex @@ -224,7 +224,7 @@ def post_chat_message_operation do def delete_operation do %Operation{ - tags: ["chat"], + tags: ["Chats"], summary: "delete", operationId: "ChatController.delete", parameters: [ diff --git a/lib/pleroma/web/api_spec/operations/instance_operation.ex b/lib/pleroma/web/api_spec/operations/instance_operation.ex index d1cfe4aa01..c73628c35d 100644 --- a/lib/pleroma/web/api_spec/operations/instance_operation.ex +++ b/lib/pleroma/web/api_spec/operations/instance_operation.ex @@ -25,7 +25,7 @@ def show_operation do def show2_operation do %Operation{ - tags: ["Instance"], + tags: ["Instance misc"], summary: "Retrieve instance information", description: "Information about the server", operationId: "InstanceController.show2", @@ -48,7 +48,7 @@ def peers_operation do def rules_operation do %Operation{ - tags: ["Instance"], + tags: ["Instance misc"], summary: "Retrieve list of instance rules", operationId: "InstanceController.rules", responses: %{ @@ -59,7 +59,7 @@ def rules_operation do def domain_blocks_operation do %Operation{ - tags: ["Instance"], + tags: ["Instance misc"], summary: "Retrieve instance domain blocks", operationId: "InstanceController.domain_blocks", responses: %{ diff --git a/test/pleroma/user_test.exs b/test/pleroma/user_test.exs index 450aea5a95..513b69e9cd 100644 --- a/test/pleroma/user_test.exs +++ b/test/pleroma/user_test.exs @@ -2727,8 +2727,6 @@ test "returns fully qualified nickname for local users" do test "returns fully qualified nickname for local users when using different domain for webfinger" do clear_config([Pleroma.Web.WebFinger, :domain], "plemora.dev") - host = Pleroma.Web.Endpoint.host() - local_user = insert(:user, nickname: "local_user") assert User.full_nickname(local_user) == "local_user@plemora.dev" diff --git a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs index 38bfd791ab..d38f1077fc 100644 --- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs @@ -2229,7 +2229,7 @@ test "it returns 404 if the user cannot see the post", %{conn: conn} do test "it translates a status to user language" do user = insert(:user, language: "fr") - %{conn: conn, user: user} = oauth_access(["read:statuses"], user: user) + %{conn: conn} = oauth_access(["read:statuses"], user: user) another_user = insert(:user) {:ok, activity} = @@ -2252,7 +2252,7 @@ test "it translates a status to user language" do end test "it returns an error if no target language provided" do - %{conn: conn, user: user} = oauth_access(["read:statuses"]) + %{conn: conn} = oauth_access(["read:statuses"]) another_user = insert(:user) {:ok, activity} = @@ -2261,10 +2261,9 @@ test "it returns an error if no target language provided" do language: "pl" }) - response = - conn - |> post("/api/v1/statuses/#{activity.id}/translate") - |> json_response_and_validate_schema(400) + conn + |> post("/api/v1/statuses/#{activity.id}/translate") + |> json_response_and_validate_schema(400) end test "it doesn't translate non-public statuses" do @@ -2277,10 +2276,9 @@ test "it doesn't translate non-public statuses" do language: "pl" }) - response = - conn - |> post("/api/v1/statuses/#{activity.id}/translate") - |> json_response_and_validate_schema(404) + conn + |> post("/api/v1/statuses/#{activity.id}/translate") + |> json_response_and_validate_schema(404) end end end diff --git a/test/pleroma/web/pleroma_api/controllers/event_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/event_controller_test.exs index 688063e212..279a153870 100644 --- a/test/pleroma/web/pleroma_api/controllers/event_controller_test.exs +++ b/test/pleroma/web/pleroma_api/controllers/event_controller_test.exs @@ -175,7 +175,7 @@ test "don't display requests if not an author", %{conn: conn} do [user: user, conn: conn] end - test "joins an event", %{conn: conn, user: user} do + test "joins an event", %{conn: conn} do other_user = insert(:user) {:ok, activity} = diff --git a/test/pleroma/webhook_test.exs b/test/pleroma/webhook_test.exs index 21763f1e00..ea13787302 100644 --- a/test/pleroma/webhook_test.exs +++ b/test/pleroma/webhook_test.exs @@ -5,7 +5,6 @@ defmodule Pleroma.WebhookTest do use Pleroma.DataCase, async: true - alias Pleroma.Repo alias Pleroma.Webhook test "creating a webhook" do