forked from AkkomaGang/akkoma
Twitter API: Add tests for nil names.
This commit is contained in:
parent
cb6fd73861
commit
db78c72868
1 changed files with 7 additions and 0 deletions
|
@ -13,6 +13,13 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
|
|||
[user: user]
|
||||
end
|
||||
|
||||
test "A user with only a nickname", %{user: user} do
|
||||
user = %{user | name: nil, nickname: "scarlett@catgirl.science"}
|
||||
represented = UserView.render("show.json", %{user: user})
|
||||
assert represented["name"] == user.nickname
|
||||
assert represented["name_html"] == user.nickname
|
||||
end
|
||||
|
||||
test "A user with an avatar object", %{user: user} do
|
||||
image = "image"
|
||||
user = %{user | avatar: %{"url" => [%{"href" => image}]}}
|
||||
|
|
Loading…
Reference in a new issue