diff --git a/lib/pleroma/web/api_spec/operations/status_operation.ex b/lib/pleroma/web/api_spec/operations/status_operation.ex index 27995cc34f..374f239c5f 100644 --- a/lib/pleroma/web/api_spec/operations/status_operation.ex +++ b/lib/pleroma/web/api_spec/operations/status_operation.ex @@ -639,12 +639,11 @@ defmodule Pleroma.Web.ApiSpec.StatusOperation do description: "ISO 8601 Datetime at which to schedule a status. Providing this parameter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future." }, - language: - %Schema{ - type: :string, - nullable: true, - description: "ISO 639 language code for this status." - }, + language: %Schema{ + type: :string, + nullable: true, + description: "ISO 639 language code for this status." + }, visibility: %Schema{ nullable: true, anyOf: [ diff --git a/test/pleroma/web/activity_pub/builder_test.exs b/test/pleroma/web/activity_pub/builder_test.exs index cb154ced4e..7f46371923 100644 --- a/test/pleroma/web/activity_pub/builder_test.exs +++ b/test/pleroma/web/activity_pub/builder_test.exs @@ -56,19 +56,17 @@ defmodule Pleroma.Web.ActivityPub.BuilderTest do tags: [], summary_map: %{"a" => "mew", "b" => "lol"}, cc: [], - extra: %{} + extra: %{}, + language: "a" } assert {:ok, %{ "contentMap" => %{"a" => "mew", "b" => "lol"}, - "content" => content, + "content" => "mew", "summaryMap" => %{"a" => "mew", "b" => "lol"}, - "summary" => summary + "summary" => "mew" }, []} = Builder.note(draft) - - assert is_binary(content) - assert is_binary(summary) end test "quote post" do diff --git a/test/pleroma/web/common_api/activity_draft_test.exs b/test/pleroma/web/common_api/activity_draft_test.exs index 2257afe0da..6ad086330a 100644 --- a/test/pleroma/web/common_api/activity_draft_test.exs +++ b/test/pleroma/web/common_api/activity_draft_test.exs @@ -19,18 +19,16 @@ defmodule Pleroma.Web.CommonAPI.ActivityDraftTest do {:ok, draft} = ActivityDraft.create(user, %{ status_map: %{"a" => "mew mew", "b" => "lol lol"}, - spoiler_text_map: %{"a" => "mew", "b" => "lol"} + spoiler_text_map: %{"a" => "mew", "b" => "lol"}, + language: "a" }) assert %{ "contentMap" => %{"a" => "mew mew", "b" => "lol lol"}, - "content" => content, + "content" => "mew mew", "summaryMap" => %{"a" => "mew", "b" => "lol"}, - "summary" => summary + "summary" => "mew" } = draft.object - - assert is_binary(content) - assert is_binary(summary) end end diff --git a/test/pleroma/web/mastodon_api/views/poll_view_test.exs b/test/pleroma/web/mastodon_api/views/poll_view_test.exs index 9c8b356f0e..b797e204fd 100644 --- a/test/pleroma/web/mastodon_api/views/poll_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/poll_view_test.exs @@ -184,7 +184,7 @@ defmodule Pleroma.Web.MastodonAPI.PollViewTest do assert %{ options: [ - %{title: "mew | 喵", title_map: %{"en" => "mew", "cmn" => "喵"}}, + %{title: "mew", title_map: %{"en" => "mew", "cmn" => "喵"}}, %{title: "mew mew", title_map: %{"en" => "mew mew", "cmn" => "喵喵"}} ] } = PollView.render("show.json", %{object: object})