X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fwebsub%2Fwebsub_test.exs;h=46ca545de7be258db102542fae6d2def3d2ce63e;hb=118d6dcdf4b2c81b4cbe51fd43977722b3eee164;hp=9a9b9df02c0692a0f00d19c9877ade7d41c2123c;hpb=1ce1b7b58dc0e009635c9dd6e2571df56c04f356;p=akkoma
diff --git a/test/web/websub/websub_test.exs b/test/web/websub/websub_test.exs
index 9a9b9df02..46ca545de 100644
--- a/test/web/websub/websub_test.exs
+++ b/test/web/websub/websub_test.exs
@@ -1,14 +1,19 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors
+# Copyright © 2017-2019 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.WebsubTest do
use Pleroma.DataCase
+ use Oban.Testing, repo: Pleroma.Repo
+
+ alias Pleroma.Tests.ObanHelpers
+ alias Pleroma.Web.Router.Helpers
alias Pleroma.Web.Websub
- alias Pleroma.Web.Websub.WebsubServerSubscription
alias Pleroma.Web.Websub.WebsubClientSubscription
+ alias Pleroma.Web.Websub.WebsubServerSubscription
+ alias Pleroma.Workers.SubscriberWorker
+
import Pleroma.Factory
- alias Pleroma.Web.Router.Helpers
import Tesla.Mock
setup do
@@ -222,6 +227,7 @@ defmodule Pleroma.Web.WebsubTest do
})
_refresh = Websub.refresh_subscriptions()
+ ObanHelpers.perform(all_enqueued(worker: SubscriberWorker))
assert still_good == Repo.get(WebsubClientSubscription, still_good.id)
refute needs_refresh == Repo.get(WebsubClientSubscription, needs_refresh.id)