aboutsummaryrefslogtreecommitdiff
path: root/test/support/helpers.ex
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-02-11 08:35:26 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-02-11 08:35:26 +0300
commit58574ef15627dbae8f12ba59fd043c70d287f794 (patch)
treee0cd96700cfe5b271336dec07570a58961b4f91d /test/support/helpers.ex
parent3830cb538bd3aaee3fc48bc97b57230a558b98cf (diff)
parent94e5ca11054567e0edc15ef3a350f02c386d3ead (diff)
downloadpleroma-58574ef15627dbae8f12ba59fd043c70d287f794.tar.gz
Merge branch 'develop' into issue/1276
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)