projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'chore/remove-reference-to-distsn' into 'develop'
[akkoma]
/
test
/
workers
/
cron
/
purge_expired_activities_worker_test.exs
diff --git
a/test/workers/cron/purge_expired_activities_worker_test.exs
b/test/workers/cron/purge_expired_activities_worker_test.exs
index 11b696bd80b1f3cdf10969e691060bc7b95e6f49..b1db59fdf8876eb89ae3d64a715711af70365b69 100644
(file)
--- a/
test/workers/cron/purge_expired_activities_worker_test.exs
+++ b/
test/workers/cron/purge_expired_activities_worker_test.exs
@@
-11,8
+11,9
@@
defmodule Pleroma.Workers.Cron.PurgeExpiredActivitiesWorkerTest do
import Pleroma.Factory
import ExUnit.CaptureLog
import Pleroma.Factory
import ExUnit.CaptureLog
- clear_config([ActivityExpiration, :enabled])
- clear_config([:instance, :rewrite_policy])
+ setup do
+ clear_config([ActivityExpiration, :enabled])
+ end
test "deletes an expiration activity" do
Pleroma.Config.put([ActivityExpiration, :enabled], true)
test "deletes an expiration activity" do
Pleroma.Config.put([ActivityExpiration, :enabled], true)
@@
-40,16
+41,13
@@
defmodule Pleroma.Workers.Cron.PurgeExpiredActivitiesWorkerTest do
test "works with ActivityExpirationPolicy" do
Pleroma.Config.put([ActivityExpiration, :enabled], true)
test "works with ActivityExpirationPolicy" do
Pleroma.Config.put([ActivityExpiration, :enabled], true)
- Pleroma.Config.put(
- [:instance, :rewrite_policy],
- Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy
- )
+ clear_config([:mrf, :policies], Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy)
user = insert(:user)
days = Pleroma.Config.get([:mrf_activity_expiration, :days], 365)
user = insert(:user)
days = Pleroma.Config.get([:mrf_activity_expiration, :days], 365)
- {:ok, %{id: id} = activity} = Pleroma.Web.CommonAPI.post(user, %{
"status" =>
"cofe"})
+ {:ok, %{id: id} = activity} = Pleroma.Web.CommonAPI.post(user, %{
status:
"cofe"})
past_date =
NaiveDateTime.utc_now() |> Timex.shift(days: -days) |> NaiveDateTime.truncate(:second)
past_date =
NaiveDateTime.utc_now() |> Timex.shift(days: -days) |> NaiveDateTime.truncate(:second)