projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix some more tests.
[akkoma]
/
test
/
web
/
ostatus
/
user_representer_test.exs
diff --git
a/test/web/ostatus/user_representer_test.exs
b/test/web/ostatus/user_representer_test.exs
index a401a56daecc4514bcbf82552e92952522964d44..d5d70f5c61a53c8d4704a1e8ae487ad58e62583e 100644
(file)
--- a/
test/web/ostatus/user_representer_test.exs
+++ b/
test/web/ostatus/user_representer_test.exs
@@
-6,15
+6,19
@@
defmodule Pleroma.Web.OStatus.UserRepresenterTest do
alias Pleroma.User
test "returns a user with id, uri, name and link" do
alias Pleroma.User
test "returns a user with id, uri, name and link" do
- user = build(:user)
+ user = build(:user
, nickname: "レイン"
)
tuple = UserRepresenter.to_simple_form(user)
tuple = UserRepresenter.to_simple_form(user)
- res = :xmerl.export_simple_content(tuple, :xmerl_xml) |>
IO.iodata_to_binary
+ res = :xmerl.export_simple_content(tuple, :xmerl_xml) |>
to_string
expected = """
<id>#{user.ap_id}</id>
<activity:object>http://activitystrea.ms/schema/1.0/person</activity:object>
<uri>#{user.ap_id}</uri>
expected = """
<id>#{user.ap_id}</id>
<activity:object>http://activitystrea.ms/schema/1.0/person</activity:object>
<uri>#{user.ap_id}</uri>
+ <poco:preferredUsername>#{user.nickname}</poco:preferredUsername>
+ <poco:displayName>#{user.name}</poco:displayName>
+ <poco:note>#{user.bio}</poco:note>
+ <summary>#{user.bio}</summary>
<name>#{user.nickname}</name>
<link rel="avatar" href="#{User.avatar_url(user)}" />
"""
<name>#{user.nickname}</name>
<link rel="avatar" href="#{User.avatar_url(user)}" />
"""