X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fostatus%2Fuser_representer_test.exs;h=e3863d2e9ca1d087bd39be70111d173c2617a4a5;hb=cd6da3606b0170b1a5c7d64b96f1621896cc0930;hp=80ac8181ad5ebffc16ef36857a328b71ad72fadc;hpb=04fb4f9c47b273256d628eefa5bd8af77cca31fb;p=akkoma
diff --git a/test/web/ostatus/user_representer_test.exs b/test/web/ostatus/user_representer_test.exs
index 80ac8181a..e3863d2e9 100644
--- a/test/web/ostatus/user_representer_test.exs
+++ b/test/web/ostatus/user_representer_test.exs
@@ -1,3 +1,7 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.OStatus.UserRepresenterTest do
use Pleroma.DataCase
alias Pleroma.Web.OStatus.UserRepresenter
@@ -6,10 +10,10 @@ defmodule Pleroma.Web.OStatus.UserRepresenterTest do
alias Pleroma.User
test "returns a user with id, uri, name and link" do
- user = build(:user)
+ user = insert(: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 = """
#{user.ap_id}
@@ -18,8 +22,11 @@ defmodule Pleroma.Web.OStatus.UserRepresenterTest do
#{user.nickname}
#{user.name}
#{user.bio}
+ #{user.bio}
#{user.nickname}
+
+ true
"""
assert clean(res) == clean(expected)