Merge branch 'feature/1822-files-consistency' into 'develop'
[akkoma] / test / pleroma / mfa / backup_codes_test.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.MFA.BackupCodesTest do
6 use Pleroma.DataCase
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