diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-04-22 15:34:29 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-04-22 15:34:29 +0200 |
commit | cef4a4d7095eae474c0bebaa4b0fb0001f140672 (patch) | |
tree | 4bc0c9062e597e2d85c005d93ef6dbacf098e84a /test | |
parent | 04fb4f9c47b273256d628eefa5bd8af77cca31fb (diff) | |
download | pleroma-cef4a4d7095eae474c0bebaa4b0fb0001f140672.tar.gz |
Fix utf8 problems with iolists.
Diffstat (limited to 'test')
-rw-r--r-- | test/support/factory.ex | 2 | ||||
-rw-r--r-- | test/web/ostatus/feed_representer_test.exs | 2 | ||||
-rw-r--r-- | test/web/ostatus/user_representer_test.exs | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex index 401fdfda3..d7c16f0e0 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -3,7 +3,7 @@ defmodule Pleroma.Factory do 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"), diff --git a/test/web/ostatus/feed_representer_test.exs b/test/web/ostatus/feed_representer_test.exs index a5f28f6d5..9a02d8c16 100644 --- a/test/web/ostatus/feed_representer_test.exs +++ b/test/web/ostatus/feed_representer_test.exs @@ -14,7 +14,7 @@ defmodule Pleroma.Web.OStatus.FeedRepresenterTest do 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) diff --git a/test/web/ostatus/user_representer_test.exs b/test/web/ostatus/user_representer_test.exs index 80ac8181a..a4afc2cf7 100644 --- a/test/web/ostatus/user_representer_test.exs +++ b/test/web/ostatus/user_representer_test.exs @@ -6,10 +6,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 = 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> |