X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fostatus%2Ffeed_representer_test.exs;h=efd4e7217ed1cb7e394fedf6b0a7625a76581ca6;hb=2d21ea1a0e1be2e737dc4d283e72207580856214;hp=5b8eabcb9dfadd2c5880e046f50a84bbefdd545b;hpb=91928b06ab9574f68a48003401083783a540da87;p=akkoma
diff --git a/test/web/ostatus/feed_representer_test.exs b/test/web/ostatus/feed_representer_test.exs
index 5b8eabcb9..efd4e7217 100644
--- a/test/web/ostatus/feed_representer_test.exs
+++ b/test/web/ostatus/feed_representer_test.exs
@@ -1,8 +1,14 @@
+# 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
alias Pleroma.User
- alias Pleroma.Web.OStatus.{FeedRepresenter, UserRepresenter, ActivityRepresenter}
+ alias Pleroma.Web.OStatus.ActivityRepresenter
+ alias Pleroma.Web.OStatus.FeedRepresenter
+ alias Pleroma.Web.OStatus.UserRepresenter
alias Pleroma.Web.OStatus
test "returns a feed of the last 20 items of the user" do
@@ -11,15 +17,19 @@ 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 = """
@@ -39,6 +49,7 @@ defmodule Pleroma.Web.OStatus.FeedRepresenterTest do
"""
+
assert clean(res) == clean(expected)
end