aboutsummaryrefslogtreecommitdiff
path: root/test/mfa/backup_codes_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-05-08 21:37:55 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-05-08 21:37:55 +0300
commitb2924ab1fbba4e6add15030cf8444d2d3f0cfe0c (patch)
tree000420341c4397cb7e380ff6fa52bb023700476a /test/mfa/backup_codes_test.exs
parentd5cdc907e3fda14c2ce78ddbb124739441330ecc (diff)
parent570940a3fd8d5a2fb600656432dfc01304161221 (diff)
downloadpleroma-b2924ab1fbba4e6add15030cf8444d2d3f0cfe0c.tar.gz
Merge remote-tracking branch 'remotes/origin/develop' into restricted-relations-embedding
Diffstat (limited to 'test/mfa/backup_codes_test.exs')
-rw-r--r--test/mfa/backup_codes_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mfa/backup_codes_test.exs b/test/mfa/backup_codes_test.exs
new file mode 100644
index 000000000..7bc01b36b
--- /dev/null
+++ b/test/mfa/backup_codes_test.exs
@@ -0,0 +1,11 @@
+defmodule Pleroma.MFA.BackupCodesTest do
+ use Pleroma.DataCase
+
+ alias Pleroma.MFA.BackupCodes
+
+ test "generate backup codes" do
+ codes = BackupCodes.generate(number_of_codes: 2, length: 4)
+
+ assert [<<_::bytes-size(4)>>, <<_::bytes-size(4)>>] = codes
+ end
+end