remove `unread_conversation_count` from User
[akkoma] / test / web / activity_pub / mrf / vocabulary_policy_test.exs
index 38309f9f1f3ee4926bc141020d61be18c3d581de..2bceb67ee85f6768430c4a53389748b2899a4a32 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-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.VocabularyPolicyTest do
@@ -8,7 +8,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.VocabularyPolicyTest do
   alias Pleroma.Web.ActivityPub.MRF.VocabularyPolicy
 
   describe "accept" do
-    clear_config([:mrf_vocabulary, :accept])
+    setup do: clear_config([:mrf_vocabulary, :accept])
 
     test "it accepts based on parent activity type" do
       Pleroma.Config.put([:mrf_vocabulary, :accept], ["Like"])
@@ -46,7 +46,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.VocabularyPolicyTest do
         }
       }
 
-      {:reject, nil} = VocabularyPolicy.filter(message)
+      {:reject, _} = VocabularyPolicy.filter(message)
     end
 
     test "it does not accept disallowed parent types" do
@@ -60,12 +60,12 @@ defmodule Pleroma.Web.ActivityPub.MRF.VocabularyPolicyTest do
         }
       }
 
-      {:reject, nil} = VocabularyPolicy.filter(message)
+      {:reject, _} = VocabularyPolicy.filter(message)
     end
   end
 
   describe "reject" do
-    clear_config([:mrf_vocabulary, :reject])
+    setup do: clear_config([:mrf_vocabulary, :reject])
 
     test "it rejects based on parent activity type" do
       Pleroma.Config.put([:mrf_vocabulary, :reject], ["Like"])
@@ -75,7 +75,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.VocabularyPolicyTest do
         "object" => "whatever"
       }
 
-      {:reject, nil} = VocabularyPolicy.filter(message)
+      {:reject, _} = VocabularyPolicy.filter(message)
     end
 
     test "it rejects based on child object type" do
@@ -89,7 +89,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.VocabularyPolicyTest do
         }
       }
 
-      {:reject, nil} = VocabularyPolicy.filter(message)
+      {:reject, _} = VocabularyPolicy.filter(message)
     end
 
     test "it passes through objects that aren't disallowed" do