X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fsupport%2Foban_helpers.ex;h=9f90a821ce786bc3d1944131d123bc4695721280;hb=dccbed856df131900bf7851fbd11c518f85bce7a;hp=9897709263295f9ec264eb797f1a784f47879531;hpb=ca1ba1e272fd51ee1d9524a39da07b4b2f9e0b6e;p=akkoma
diff --git a/test/support/oban_helpers.ex b/test/support/oban_helpers.ex
index 989770926..9f90a821c 100644
--- a/test/support/oban_helpers.ex
+++ b/test/support/oban_helpers.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Tests.ObanHelpers do
@@ -9,6 +9,10 @@ defmodule Pleroma.Tests.ObanHelpers do
alias Pleroma.Repo
+ def wipe_all do
+ Repo.delete_all(Oban.Job)
+ end
+
def perform_all do
Oban.Job
|> Repo.all()
@@ -16,7 +20,7 @@ defmodule Pleroma.Tests.ObanHelpers do
end
def perform(%Oban.Job{} = job) do
- res = apply(String.to_existing_atom("Elixir." <> job.worker), :perform, [job.args, job])
+ res = apply(String.to_existing_atom("Elixir." <> job.worker), :perform, [job])
Repo.delete(job)
res
end