mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-24 07:16:18 +00:00
20 lines
447 B
Elixir
20 lines
447 B
Elixir
defmodule Pleroma.Web.MastodonAPI.ListViewTest do
|
|
use Pleroma.DataCase
|
|
import Pleroma.Factory
|
|
alias Pleroma.Web.MastodonAPI.ListView
|
|
alias Pleroma.List
|
|
|
|
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
|