diff options
author | Maxim Filippov <colixer@gmail.com> | 2019-07-14 00:37:19 +0300 |
---|---|---|
committer | Maxim Filippov <colixer@gmail.com> | 2019-07-14 00:37:26 +0300 |
commit | a9459ff98f0af590931ef279c2bc7efb0cceac5a (patch) | |
tree | a580e9207f5117640c4707ae554a8207c4583be5 /test/support/factory.ex | |
parent | db75288b71e7531f8e5033f56fc0b9a7d1d8efb3 (diff) | |
download | pleroma-a9459ff98f0af590931ef279c2bc7efb0cceac5a.tar.gz pleroma-a9459ff98f0af590931ef279c2bc7efb0cceac5a.zip |
Admin API: Endpoint for fetching latest user's statuses
Diffstat (limited to 'test/support/factory.ex')
-rw-r--r-- | test/support/factory.ex | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex index 531eb81e4..807b34545 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -118,7 +118,10 @@ defmodule Pleroma.Factory do def note_activity_factory(attrs \\ %{}) do user = attrs[:user] || insert(:user) note = attrs[:note] || insert(:note, user: user) + published = attrs[:published] || DateTime.utc_now() |> DateTime.to_iso8601() attrs = Map.drop(attrs, [:user, :note]) + require IEx + IEx.pry() data = %{ "id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id(), @@ -126,7 +129,7 @@ defmodule Pleroma.Factory do "actor" => note.data["actor"], "to" => note.data["to"], "object" => note.data["id"], - "published" => DateTime.utc_now() |> DateTime.to_iso8601(), + "published" => published, "context" => note.data["context"] } |