diff options
author | Mark Felder <feld@feld.me> | 2024-09-30 14:45:13 -0400 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2024-09-30 14:45:13 -0400 |
commit | b2340b5b776d243f6cf12971393783cc3b7c2dc2 (patch) | |
tree | b2c49ec10ec830efe4a795f609c787d8886b727b /test/support/factory.ex | |
parent | 766edfe5b2b19f4819704540341b8fcc92f133bd (diff) | |
download | pleroma-b2340b5b776d243f6cf12971393783cc3b7c2dc2.tar.gz pleroma-b2340b5b776d243f6cf12971393783cc3b7c2dc2.zip |
Permit backdating the poll closed timestamp
Diffstat (limited to 'test/support/factory.ex')
-rw-r--r-- | test/support/factory.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex index 8f1c6faf9..732ea3143 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -241,6 +241,7 @@ defmodule Pleroma.Factory do def question_factory(attrs \\ %{}) do user = attrs[:user] || insert(:user) + closed = attrs[:closed] || DateTime.utc_now() |> DateTime.add(86_400) |> DateTime.to_iso8601() data = %{ "id" => Pleroma.Web.ActivityPub.Utils.generate_object_id(), @@ -251,7 +252,7 @@ defmodule Pleroma.Factory do "to" => ["https://www.w3.org/ns/activitystreams#Public"], "cc" => [user.follower_address], "context" => Pleroma.Web.ActivityPub.Utils.generate_context_id(), - "closed" => DateTime.utc_now() |> DateTime.add(86_400) |> DateTime.to_iso8601(), + "closed" => closed, "content" => "Which flavor of ice cream do you prefer?", "oneOf" => [ %{ |