akkoma/test/web/mastodon_api/list_view_test.exs
Maksim Pechnikov 89b3729afa fix warnings
2018-12-12 09:09:19 +03:00

18 lines
426 B
Elixir

defmodule Pleroma.Web.MastodonAPI.ListViewTest do
use Pleroma.DataCase
import Pleroma.Factory
alias Pleroma.Web.MastodonAPI.ListView
test "Represent a list" do
user = insert(:user)
title = "mortal enemies"
{:ok, list} = Pleroma.List.create(title, user)
expected = %{
id: to_string(list.id),
title: title
}
assert expected == ListView.render("list.json", %{list: list})
end
end