1 defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
4 alias Pleroma.Web.MastodonAPI.AccountView
6 test "Represent a user account" do
7 user = insert(:user, %{info: %{"note_count" => 5, "follower_count" => 3}, nickname: "shp@shitposter.club"})
13 display_name: user.name,
15 created_at: user.inserted_at,
21 avatar: "https://placehold.it/48x48",
22 avatar_static: "https://placehold.it/48x48",
23 header: "https://placehold.it/700x335",
24 header_static: "https://placehold.it/700x335"
27 assert expected == AccountView.render("account.json", %{user: user})
30 test "Represent a smaller mention" do
36 username: user.nickname,
40 assert expected == AccountView.render("mention.json", %{user: user})