diff options
| author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-08-22 20:46:01 +0300 | 
|---|---|---|
| committer | rinpatch <rinpatch@sdf.org> | 2020-09-10 21:50:40 +0300 | 
| commit | 9bf1065a06837b4c753549d89afe23a636a20972 (patch) | |
| tree | 1637cfc658487fd95b89282b87212b9b7f354a83 /test/support | |
| parent | 0254696e30132f48e585154450aff87afb259e1d (diff) | |
| download | pleroma-9bf1065a06837b4c753549d89afe23a636a20972.tar.gz pleroma-9bf1065a06837b4c753549d89afe23a636a20972.zip  | |
schedule activity expiration in Oban
Diffstat (limited to 'test/support')
| -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)  | 
