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.MFA.BackupCodesTest do
8 alias Pleroma.MFA.BackupCodes
10 test "generate backup codes" do
11 codes = BackupCodes.generate(number_of_codes: 2, length: 4)
13 assert [<<_::bytes-size(4)>>, <<_::bytes-size(4)>>] = codes