MastoAPI: Remove domain ending from account name.
[akkoma] / test / web / mastodon_api / account_view_test.exs
index f0c8673ade048cd2e342b632cd4e8a21841892eb..0106fbcc0f5c43797ba71a95a1db56cc88ea536f 100644 (file)
@@ -4,11 +4,11 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
   alias Pleroma.Web.MastodonAPI.AccountView
 
   test "Represent a user account" do
-    user = insert(:user, %{info: %{"note_count" => 5, "follower_count" => 3}})
+    user = insert(:user, %{info: %{"note_count" => 5, "follower_count" => 3}, nickname: "shp@shitposter.club"})
 
     expected = %{
       id: user.id,
-      username: user.nickname,
+      username: "shp",
       acct: user.nickname,
       display_name: user.name,
       locked: false,
@@ -20,8 +20,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
       url: user.ap_id,
       avatar: "https://placehold.it/48x48",
       avatar_static: "https://placehold.it/48x48",
-      header: "",
-      header_static: ""
+      header: "https://placehold.it/700x335",
+      header_static: "https://placehold.it/700x335"
     }
 
     assert expected == AccountView.render("account.json", %{user: user})