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:
parent
74f7b4701e
commit
6175695d28
4 changed files with 14 additions and 19 deletions
|
|
@ -639,8 +639,7 @@ 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{
|
||||
language: %Schema{
|
||||
type: :string,
|
||||
nullable: true,
|
||||
description: "ISO 639 language code for this status."
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue