mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-12-29 05:15:36 +01:00
Twitter API: Add tests for nil names.
This commit is contained in:
parent
cb6fd73861
commit
db78c72868
@ -13,6 +13,13 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
|
|||||||
[user: user]
|
[user: user]
|
||||||
end
|
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
|
test "A user with an avatar object", %{user: user} do
|
||||||
image = "image"
|
image = "image"
|
||||||
user = %{user | avatar: %{"url" => [%{"href" => image}]}}
|
user = %{user | avatar: %{"url" => [%{"href" => image}]}}
|
||||||
|
Loading…
Reference in New Issue
Block a user