blob: 49818afed7d80c6c934544240111260e3c861f13 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
 | 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
 |