Update majic & call plug before OpenApiSpex
[akkoma] / test / emails / mailer_test.exs
index 450bb09c74e58e90db1d836135260e1a6e1125c2..e6e34cba8a3eba3f9efc98cb6ae2f9091e8b3cb5 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Emails.MailerTest do
@@ -14,12 +14,7 @@ defmodule Pleroma.Emails.MailerTest do
     subject: "Pleroma test email",
     to: [{"Test User", "user1@example.com"}]
   }
-
-  setup do
-    value = Pleroma.Config.get([Pleroma.Emails.Mailer, :enabled])
-    on_exit(fn -> Pleroma.Config.put([Pleroma.Emails.Mailer, :enabled], value) end)
-    :ok
-  end
+  setup do: clear_config([Pleroma.Emails.Mailer, :enabled])
 
   test "not send email when mailer is disabled" do
     Pleroma.Config.put([Pleroma.Emails.Mailer, :enabled], false)