diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-09-11 14:13:38 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-09-11 14:13:38 -0500 |
commit | 9733c9d06563a92e4c58ac906c5f98b617b9e731 (patch) | |
tree | abbf03ddb917c1c203cb79eab64647d3af541fff /test/support/factory.ex | |
parent | dfb831ca39db3098d6d585448a6ff8e938e51e8c (diff) | |
parent | 9fb88c814ddadd9138ef29550a856938491a1ca4 (diff) | |
download | pleroma-9733c9d06563a92e4c58ac906c5f98b617b9e731.tar.gz pleroma-9733c9d06563a92e4c58ac906c5f98b617b9e731.zip |
Merge remote-tracking branch 'upstream/develop' into chat-moderation
Diffstat (limited to 'test/support/factory.ex')
-rw-r--r-- | test/support/factory.ex | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex index 61ca4587c..e59d83242 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) |