Merge branch 'stable' into mergeback/2.2.2
[akkoma] / test / pleroma / mfa / backup_codes_test.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.MFA.BackupCodesTest do
6 use Pleroma.DataCase, async: true
7
8 alias Pleroma.MFA.BackupCodes
9
10 test "generate backup codes" do
11 codes = BackupCodes.generate(number_of_codes: 2, length: 4)
12
13 assert [<<_::bytes-size(4)>>, <<_::bytes-size(4)>>] = codes
14 end
15 end