You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
442 B
15 lines
442 B
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%22m%20a%20boy.png\" class='attachment'>i\"m a boy.png</a>"
|
|
end
|
|
end
|