a12acc2b22ebdb466c9b7292b1819515d3c524ca
[akkoma] / test / web / mastodon_api / list_view_test.exs
1 defmodule Pleroma.Web.MastodonAPI.ListViewTest do
2 use Pleroma.DataCase
3 import Pleroma.Factory
4 alias Pleroma.Web.MastodonAPI.ListView
5
6 test "Represent a list" do
7 user = insert(:user)
8 title = "mortal enemies"
9 {:ok, list} = Pleroma.List.create(title, user)
10
11 expected = %{
12 id: to_string(list.id),
13 title: title
14 }
15
16 assert expected == ListView.render("list.json", %{list: list})
17 end
18 end