X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fsupport%2Ffactory.ex;h=2fdfabbc5a228c0157a418d3ebdfde250c3f28cc;hb=c5830ac037c0c344bd22b674c41f4dc244a088aa;hp=486eda8da5676fc0b86dc39ce16a7b093ec32016;hpb=e3953923aca1706ab508bfda1ab892304b29c09a;p=akkoma 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)