diff --git a/config/test.exs b/config/test.exs index 5c6acfead..f5348bd46 100644 --- a/config/test.exs +++ b/config/test.exs @@ -6,6 +6,11 @@ http: [port: 4001], server: false +# Disable captha for tests +config :pleroma, Pleroma.Captcha, + enabled: true, + method: Pleroma.Captcha.Mock # A fake captcha service for tests + # Print only warnings and errors during test config :logger, level: :warn diff --git a/test/support/captcha_mock.ex b/test/support/captcha_mock.ex new file mode 100644 index 000000000..9d79f2e95 --- /dev/null +++ b/test/support/captcha_mock.ex @@ -0,0 +1,10 @@ +defmodule Pleroma.Captcha.Mock do + alias Pleroma.Captcha.Service + @behaviour Service + + @impl Service + def new(), do: %{type: :mock} + + @impl Service + def validate(_token, _captcha), do: true +end