tests: add tests for MRF.describe()
[akkoma] / test / support / helpers.ex
index 6e389ce5254093200c1c414da9b570853b171b15..1a92be065b04501693d67c1200eda9e35b02b09c 100644 (file)
@@ -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})