mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-25 17:40:31 +00:00
14 lines
437 B
Elixir
14 lines
437 B
Elixir
defmodule Pleroma.Web.TwitterAPI.UtilsTest do
|
|
alias Pleroma.Web.TwitterAPI.Utils
|
|
use Pleroma.DataCase
|
|
|
|
test "it adds attachment links to a given text and attachment set" do
|
|
attachment = %{
|
|
"url" => [%{"href" => "http://heise.de/i\"m a boy.png"}]
|
|
}
|
|
|
|
res = Utils.add_attachments("", [attachment])
|
|
|
|
assert res == "<br>\n<a href=\"http://heise.de/i\"m a boy.png\" class='attachment'>i\"m a boy.png</a>"
|
|
end
|
|
end
|