1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Captcha.Mock do
6 alias Pleroma.Captcha.Service
13 token: "afa1815e14e29355e6c8f6b143a39fa2",
14 answer_data: "63615261b77f5354fb8c4e4986477555",
15 url: "https://example.org/captcha.png"
19 def validate(_token, captcha, captcha) when not is_nil(captcha), do: :ok
21 def validate(_token, captcha, answer),
22 do: {:error, "Invalid CAPTCHA captcha: #{inspect(captcha)} ; answer: #{inspect(answer)}"}