Add tests for account registration with captcha enabled and improve errors

This commit is contained in:
Egor Kislitsyn 2020-04-29 20:48:08 +04:00
commit 7b0c8f0fde
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
9 changed files with 246 additions and 129 deletions

View file

@ -6,12 +6,16 @@ defmodule Pleroma.Captcha.Mock do
alias Pleroma.Captcha.Service
@behaviour Service
@solution "63615261b77f5354fb8c4e4986477555"
def solution, do: @solution
@impl Service
def new,
do: %{
type: :mock,
token: "afa1815e14e29355e6c8f6b143a39fa2",
answer_data: "63615261b77f5354fb8c4e4986477555",
answer_data: @solution,
url: "https://example.org/captcha.png"
}