Add missing deprecation warning left out of !2842
[akkoma] / test / pleroma / config / deprecation_warnings_test.exs
index 161bf6e9081ed5aa4c4d4d36b3368490b0ed8bf1..ccf86634f0b593f5de77d1be6420f54afcb6f66d 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Config.DeprecationWarningsTest do
@@ -87,7 +87,7 @@ defmodule Pleroma.Config.DeprecationWarningsTest do
   end
 
   test "check_activity_expiration_config/0" do
-    clear_config(Pleroma.ActivityExpiration, enabled: true)
+    clear_config([Pleroma.ActivityExpiration], enabled: true)
 
     assert capture_log(fn ->
              DeprecationWarnings.check_activity_expiration_config()
@@ -95,7 +95,7 @@ defmodule Pleroma.Config.DeprecationWarningsTest do
   end
 
   test "check_uploders_s3_public_endpoint/0" do
-    clear_config(Pleroma.Uploaders.S3, public_endpoint: "https://fake.amazonaws.com/bucket/")
+    clear_config([Pleroma.Uploaders.S3], public_endpoint: "https://fake.amazonaws.com/bucket/")
 
     assert capture_log(fn ->
              DeprecationWarnings.check_uploders_s3_public_endpoint()
@@ -146,4 +146,14 @@ defmodule Pleroma.Config.DeprecationWarningsTest do
                "Your config is using old setting name `timeout` instead of `recv_timeout` in pool settings"
     end
   end
+
+  test "check_old_chat_shoutbox/0" do
+    clear_config([:instance, :chat_limit], 1_000)
+    clear_config([:chat, :enabled], true)
+
+    assert capture_log(fn ->
+             DeprecationWarnings.check_old_chat_shoutbox()
+           end) =~
+             "Your config is using the old namespace for the Shoutbox configuration."
+  end
 end