1
0
Fork 0
mirror of https://git.pleroma.social/pleroma/pleroma.git synced 2026-02-15 17:16:57 +00:00

fix some tests

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk 2026-01-19 03:52:45 +01:00
parent 74f7b4701e
commit 6175695d28
4 changed files with 14 additions and 19 deletions

View file

@ -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: [

View file

@ -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

View file

@ -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

View file

@ -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})