aboutsummaryrefslogtreecommitdiff
path: root/test/support/helpers.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivant.business@gmail.com>2019-07-06 10:17:06 +0300
committerIvan Tashkinov <ivant.business@gmail.com>2019-07-06 10:17:06 +0300
commitad8d86e7c600bca65e5f0bb407651d33f1e53043 (patch)
tree75c395c888a10bad571769eaf828d989c2a5b2c4 /test/support/helpers.ex
parenta7994185739522dee80e22f76e5fdac1a3b8279b (diff)
parent3589b30ddc9d0c23ca6f00264cff05e53be1b270 (diff)
downloadpleroma-ad8d86e7c600bca65e5f0bb407651d33f1e53043.tar.gz
Merge remote-tracking branch 'remotes/upstream/develop' into 161-incoming-replies-depth-limit
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 6e389ce52..1a92be065 100644
--- a/test/support/helpers.ex
+++ b/test/support/helpers.ex
@@ -9,6 +9,12 @@ defmodule Pleroma.Tests.Helpers do
defmacro __using__(_opts) do
quote do
+ def collect_ids(collection) do
+ collection
+ |> Enum.map(& &1.id)
+ |> Enum.sort()
+ end
+
def refresh_record(%{id: id, __struct__: model} = _),
do: refresh_record(model, %{id: id})