Merge branch 'develop' into gun
[akkoma] / test / web / activity_pub / mrf / object_age_policy_test.exs
index 3ea00d768ed8a8e36f9a5599855fb41e2722498b..7ee195eeb51f3e988735bd5a53ba174331173504 100644 (file)
@@ -1,20 +1,19 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicyTest do
   use Pleroma.DataCase
   alias Pleroma.Config
   alias Pleroma.User
-  alias Pleroma.Web.ActivityPub.Visibility
   alias Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy
+  alias Pleroma.Web.ActivityPub.Visibility
 
-  clear_config([:mrf_object_age]) do
-    Config.put(:mrf_object_age,
-      threshold: 172_800,
-      actions: [:delist, :strip_followers]
-    )
-  end
+  setup do:
+          clear_config(:mrf_object_age,
+            threshold: 172_800,
+            actions: [:delist, :strip_followers]
+          )
 
   setup_all do
     Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)