Add scheduled activities

This commit is contained in:
eugenijm 2019-03-28 12:39:10 +03:00
commit 7bf622ce73
8 changed files with 284 additions and 0 deletions

View file

@ -23,6 +23,14 @@ defmodule Pleroma.Factory do
}
end
def scheduled_activity_factory do
%Pleroma.ScheduledActivity{
user: build(:user),
scheduled_at: NaiveDateTime.add(NaiveDateTime.utc_now(), :timer.minutes(60), :millisecond),
params: build(:note) |> Map.from_struct() |> Map.get(:data)
}
end
def note_factory(attrs \\ %{}) do
text = sequence(:text, &"This is :moominmamma: note #{&1}")