logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

backup_codes_test.exs (443B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.MFA.BackupCodesTest do
  5. use Pleroma.DataCase, async: true
  6. alias Pleroma.MFA.BackupCodes
  7. test "generate backup codes" do
  8. codes = BackupCodes.generate(number_of_codes: 2, length: 4)
  9. assert [<<_::bytes-size(4)>>, <<_::bytes-size(4)>>] = codes
  10. end
  11. end