response = FeedRepresenter.to_simple_form(user, activities, [user])
|> :xmerl.export_simple(:xmerl_xml)
+ |> to_string
conn
|> put_resp_content_type("application/atom+xml")
def user_factory do
user = %Pleroma.User{
- name: sequence(:name, &"Test User #{&1}"),
+ name: sequence(:name, &"Test テスト User #{&1}"),
email: sequence(:email, &"user#{&1}@example.com"),
nickname: sequence(:nickname, &"nick#{&1}"),
password_hash: Comeonin.Pbkdf2.hashpwsalt("test"),
most_recent_update = note_activity.updated_at
|> NaiveDateTime.to_iso8601
- res = :xmerl.export_simple_content(tuple, :xmerl_xml) |> IO.iodata_to_binary
+ res = :xmerl.export_simple_content(tuple, :xmerl_xml) |> to_string
user_xml = UserRepresenter.to_simple_form(user)
|> :xmerl.export_simple_content(:xmerl_xml)
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)
- 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>