summaryrefslogtreecommitdiff
path: root/test/support/factory.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-09-11 17:19:58 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-09-11 17:19:58 +0300
commit0bda85857e8f320ee7b91d8203fd621e1e2d5180 (patch)
treec77346be760cff6c3f50eceee778ef43a4bd252a /test/support/factory.ex
parent4d18a50f3c4b6654339a6a8df71160e23b45cac0 (diff)
parent9fb88c814ddadd9138ef29550a856938491a1ca4 (diff)
downloadpleroma-0bda85857e8f320ee7b91d8203fd621e1e2d5180.tar.gz
pleroma-0bda85857e8f320ee7b91d8203fd621e1e2d5180.zip
Merge remote-tracking branch 'remotes/origin/develop' into media-preview-proxy
# Conflicts: # lib/pleroma/instances/instance.ex
Diffstat (limited to 'test/support/factory.ex')
-rw-r--r--test/support/factory.ex19
1 files changed, 0 insertions, 19 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex
index 486eda8da..2fdfabbc5 100644
--- a/test/support/factory.ex
+++ b/test/support/factory.ex
@@ -200,25 +200,6 @@ defmodule Pleroma.Factory do
|> Map.merge(attrs)
end
- defp expiration_offset_by_minutes(attrs, minutes) do
- scheduled_at =
- NaiveDateTime.utc_now()
- |> NaiveDateTime.add(:timer.minutes(minutes), :millisecond)
- |> NaiveDateTime.truncate(:second)
-
- %Pleroma.ActivityExpiration{}
- |> Map.merge(attrs)
- |> Map.put(:scheduled_at, scheduled_at)
- end
-
- def expiration_in_the_past_factory(attrs \\ %{}) do
- expiration_offset_by_minutes(attrs, -60)
- end
-
- def expiration_in_the_future_factory(attrs \\ %{}) do
- expiration_offset_by_minutes(attrs, 61)
- end
-
def article_activity_factory do
article = insert(:article)