diff options
| author | lain <lain@soykaf.club> | 2020-05-16 17:07:09 +0000 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-05-16 17:07:09 +0000 |
| commit | d15aa9d9503e59b3cd0731394855781f435ec63c (patch) | |
| tree | 844810415def046a2fc886d0bc1baeb1ff9afb21 /test/mfa/totp_test.exs | |
| parent | 9cf4c4fa73e68f03791c5cc70505b710be39b677 (diff) | |
| parent | 3bc1138dd9beec03d2336fa1ad45dd23816f5285 (diff) | |
| download | pleroma-d15aa9d9503e59b3cd0731394855781f435ec63c.tar.gz pleroma-d15aa9d9503e59b3cd0731394855781f435ec63c.zip | |
Merge branch 'develop' into 'remove-twitter-api'
# Conflicts:
# lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
Diffstat (limited to 'test/mfa/totp_test.exs')
| -rw-r--r-- | test/mfa/totp_test.exs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/mfa/totp_test.exs b/test/mfa/totp_test.exs new file mode 100644 index 000000000..50153d208 --- /dev/null +++ b/test/mfa/totp_test.exs @@ -0,0 +1,17 @@ +defmodule Pleroma.MFA.TOTPTest do + use Pleroma.DataCase + + alias Pleroma.MFA.TOTP + + test "create provisioning_uri to generate qrcode" do + uri = + TOTP.provisioning_uri("test-secrcet", "test@example.com", + issuer: "Plerome-42", + digits: 8, + period: 60 + ) + + assert uri == + "otpauth://totp/test@example.com?digits=8&issuer=Plerome-42&period=60&secret=test-secrcet" + end +end |
