X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fpleroma%2Fweb%2Factivity_pub%2Fmrf%2Freject_non_public_test.exs;h=63c68d79889d47579c70ca446e89ffdd68f49f39;hb=03f38ac4ebd97e792b0ff2a6ac804adefed85a41;hp=58b46b9a2cf41d0d960236306d1c4b3db97ce156;hpb=4ead0d564fa60b1a908f6237474250d6bda85ae9;p=akkoma
diff --git a/test/pleroma/web/activity_pub/mrf/reject_non_public_test.exs b/test/pleroma/web/activity_pub/mrf/reject_non_public_test.exs
index 58b46b9a2..63c68d798 100644
--- a/test/pleroma/web/activity_pub/mrf/reject_non_public_test.exs
+++ b/test/pleroma/web/activity_pub/mrf/reject_non_public_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.MRF.RejectNonPublicTest do
@@ -21,7 +21,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.RejectNonPublicTest do
"type" => "Create"
}
- assert {:ok, message} = RejectNonPublic.filter(message)
+ assert {:ok, _message} = RejectNonPublic.filter(message)
end
test "it's allowed when cc address contain public address" do
@@ -34,7 +34,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.RejectNonPublicTest do
"type" => "Create"
}
- assert {:ok, message} = RejectNonPublic.filter(message)
+ assert {:ok, _message} = RejectNonPublic.filter(message)
end
end
@@ -49,8 +49,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.RejectNonPublicTest do
"type" => "Create"
}
- Pleroma.Config.put([:mrf_rejectnonpublic, :allow_followersonly], true)
- assert {:ok, message} = RejectNonPublic.filter(message)
+ clear_config([:mrf_rejectnonpublic, :allow_followersonly], true)
+ assert {:ok, _message} = RejectNonPublic.filter(message)
end
test "it's rejected when addrer of message in the follower addresses of user and it disabled in config" do
@@ -63,7 +63,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.RejectNonPublicTest do
"type" => "Create"
}
- Pleroma.Config.put([:mrf_rejectnonpublic, :allow_followersonly], false)
+ clear_config([:mrf_rejectnonpublic, :allow_followersonly], false)
assert {:reject, _} = RejectNonPublic.filter(message)
end
end
@@ -79,8 +79,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.RejectNonPublicTest do
"type" => "Create"
}
- Pleroma.Config.put([:mrf_rejectnonpublic, :allow_direct], true)
- assert {:ok, message} = RejectNonPublic.filter(message)
+ clear_config([:mrf_rejectnonpublic, :allow_direct], true)
+ assert {:ok, _message} = RejectNonPublic.filter(message)
end
test "it's reject when direct messages aren't allow" do
@@ -93,7 +93,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.RejectNonPublicTest do
"type" => "Create"
}
- Pleroma.Config.put([:mrf_rejectnonpublic, :allow_direct], false)
+ clear_config([:mrf_rejectnonpublic, :allow_direct], false)
assert {:reject, _} = RejectNonPublic.filter(message)
end
end