diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-09-13 12:24:57 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-09-13 12:24:57 +0300 |
commit | c5830ac037c0c344bd22b674c41f4dc244a088aa (patch) | |
tree | d5a02f43337536d05b934bee3012dab319ccc127 /test/support/factory.ex | |
parent | 527afb813af6c64337d02ddf1a2f159fe557acbc (diff) | |
parent | 88fe0a262e21ba1284e72eddb1d41363dc029aa7 (diff) | |
download | pleroma-c5830ac037c0c344bd22b674c41f4dc244a088aa.tar.gz pleroma-c5830ac037c0c344bd22b674c41f4dc244a088aa.zip |
Merge develop
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 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) |