X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fostatus%2Ffeed_representer_test.exs;h=55717dec7b8a1341e657b98d904fbc00fda4b016;hb=68f483ef4cf6856c3116504987142670bc6ac76c;hp=9a02d8c16cae22ca3be501aa824fdf14ddc9416a;hpb=cef4a4d7095eae474c0bebaa4b0fb0001f140672;p=akkoma
diff --git a/test/web/ostatus/feed_representer_test.exs b/test/web/ostatus/feed_representer_test.exs
index 9a02d8c16..55717dec7 100644
--- a/test/web/ostatus/feed_representer_test.exs
+++ b/test/web/ostatus/feed_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.FeedRepresenterTest do
use Pleroma.DataCase
import Pleroma.Factory
@@ -11,31 +15,39 @@ defmodule Pleroma.Web.OStatus.FeedRepresenterTest do
tuple = FeedRepresenter.to_simple_form(user, [note_activity], [user])
- most_recent_update = note_activity.updated_at
- |> NaiveDateTime.to_iso8601
+ most_recent_update =
+ note_activity.updated_at
+ |> NaiveDateTime.to_iso8601()
res = :xmerl.export_simple_content(tuple, :xmerl_xml) |> to_string
- user_xml = UserRepresenter.to_simple_form(user)
- |> :xmerl.export_simple_content(:xmerl_xml)
- entry_xml = ActivityRepresenter.to_simple_form(note_activity, user)
- |> :xmerl.export_simple_content(:xmerl_xml)
+ user_xml =
+ UserRepresenter.to_simple_form(user)
+ |> :xmerl.export_simple_content(:xmerl_xml)
+
+ entry_xml =
+ ActivityRepresenter.to_simple_form(note_activity, user)
+ |> :xmerl.export_simple_content(:xmerl_xml)
expected = """
-
+
#{OStatus.feed_path(user)}
#{user.nickname}'s timeline
#{most_recent_update}
+ #{User.avatar_url(user)}
-
+
+
#{user_xml}
+
#{entry_xml}
"""
+
assert clean(res) == clean(expected)
end