mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-23 01:35:28 +00:00
Add a captcha mock for tests
This commit is contained in:
parent
98e10c0d4f
commit
e8537208bd
|
@ -6,6 +6,11 @@ config :pleroma, Pleroma.Web.Endpoint,
|
|||
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
|
||||
|
||||
|
|
10
test/support/captcha_mock.ex
Normal file
10
test/support/captcha_mock.ex
Normal file
|
@ -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
|
Loading…
Reference in a new issue