summaryrefslogtreecommitdiff
path: root/test/support/helpers.ex
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-02-11 13:54:55 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-02-11 13:54:55 +0400
commit6875ccb6bfcc5ae62db26d38c3d5eac4c6f8706a (patch)
treedacb02d953473e3a0c6aeec58d86fb7fb1ed5886 /test/support/helpers.ex
parent3c4a30c6db312aff2afbfcd423498be19c02c68c (diff)
parent5ebffd5224729413e53a55ddda9a1f86224d7d73 (diff)
downloadpleroma-6875ccb6bfcc5ae62db26d38c3d5eac4c6f8706a.tar.gz
pleroma-6875ccb6bfcc5ae62db26d38c3d5eac4c6f8706a.zip
Merge branch 'develop' into feature/new-registrations-digest
Diffstat (limited to 'test/support/helpers.ex')
-rw-r--r--test/support/helpers.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/support/helpers.ex b/test/support/helpers.ex
index 9f817622d..d36c29cef 100644
--- a/test/support/helpers.ex
+++ b/test/support/helpers.ex
@@ -54,6 +54,12 @@ defmodule Pleroma.Tests.Helpers do
clear_config_all: 2
]
+ def to_datetime(naive_datetime) do
+ naive_datetime
+ |> DateTime.from_naive!("Etc/UTC")
+ |> DateTime.truncate(:second)
+ end
+
def collect_ids(collection) do
collection
|> Enum.map(& &1.id)