added warning to use old keys

This commit is contained in:
Maksim Pechnikov 2020-07-23 06:51:19 +03:00
commit 7991ddad58
5 changed files with 51 additions and 0 deletions

View file

@ -9,6 +9,20 @@ defmodule Pleroma.ApplicationRequirementsTest do
alias Pleroma.Repo
describe "check_welcome_message_config!/1" do
setup do: clear_config([:welcome])
setup do: clear_config([Pleroma.Emails.Mailer])
test "raises if welcome email enabled but mail disabled" do
Pleroma.Config.put([:welcome, :email, :enabled], true)
Pleroma.Config.put([Pleroma.Emails.Mailer, :enabled], false)
assert_raise Pleroma.ApplicationRequirements.VerifyError, "The mail disabled.", fn ->
capture_log(&Pleroma.ApplicationRequirements.verify!/0)
end
end
end
describe "check_rum!" do
setup_with_mocks([
{Pleroma.ApplicationRequirements, [:passthrough],