projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'revert-2b5d9eb1' into 'develop'
[akkoma]
/
test
/
workers
/
scheduled_activity_worker_test.exs
diff --git
a/test/workers/scheduled_activity_worker_test.exs
b/test/workers/scheduled_activity_worker_test.exs
index 1405d7142df423a79fb724e2e5c13e109c4af42a..f3eddf7b14a12531e6778fb15db50466f32da585 100644
(file)
--- a/
test/workers/scheduled_activity_worker_test.exs
+++ b/
test/workers/scheduled_activity_worker_test.exs
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.ScheduledActivityWorkerTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.ScheduledActivityWorkerTest do
@@
-11,7
+11,7
@@
defmodule Pleroma.Workers.ScheduledActivityWorkerTest do
import Pleroma.Factory
import ExUnit.CaptureLog
import Pleroma.Factory
import ExUnit.CaptureLog
- clear_config([ScheduledActivity, :enabled])
+
setup do:
clear_config([ScheduledActivity, :enabled])
test "creates a status from the scheduled activity" do
Pleroma.Config.put([ScheduledActivity, :enabled], true)
test "creates a status from the scheduled activity" do
Pleroma.Config.put([ScheduledActivity, :enabled], true)
@@
-32,10
+32,7
@@
defmodule Pleroma.Workers.ScheduledActivityWorkerTest do
params: %{status: "hi"}
)
params: %{status: "hi"}
)
- ScheduledActivityWorker.perform(
- %{"activity_id" => scheduled_activity.id},
- :pid
- )
+ ScheduledActivityWorker.perform(%Oban.Job{args: %{"activity_id" => scheduled_activity.id}})
refute Repo.get(ScheduledActivity, scheduled_activity.id)
activity = Repo.all(Pleroma.Activity) |> Enum.find(&(&1.actor == user.ap_id))
refute Repo.get(ScheduledActivity, scheduled_activity.id)
activity = Repo.all(Pleroma.Activity) |> Enum.find(&(&1.actor == user.ap_id))
@@
-46,7
+43,7
@@
defmodule Pleroma.Workers.ScheduledActivityWorkerTest do
Pleroma.Config.put([ScheduledActivity, :enabled], true)
assert capture_log([level: :error], fn ->
Pleroma.Config.put([ScheduledActivity, :enabled], true)
assert capture_log([level: :error], fn ->
- ScheduledActivityWorker.perform(%
{"activity_id" => 42}, :pid
)
+ ScheduledActivityWorker.perform(%
Oban.Job{args: %{"activity_id" => 42}}
)
end) =~ "Couldn't find scheduled activity"
end
end
end) =~ "Couldn't find scheduled activity"
end
end