summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/list_view_test.exs
blob: a12acc2b22ebdb466c9b7292b1819515d3c524ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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