pleroma/test/web/common_api/common_api_test.exs
lain 0b5bc62b33 Don't save double tags in AP objects we create
This crashed Mastodon workers.
2018-05-23 17:25:24 +02:00

13 lines
319 B
Elixir

defmodule Pleroma.Web.CommonAPI.UtilsTest do
use Pleroma.DataCase
alias Pleroma.Web.CommonAPI
import Pleroma.Factory
test "it de-duplicates tags" do
user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{"status" => "#2hu #2HU"})
assert activity.data["object"]["tag"] == ["2hu"]
end
end