diff options
| author | Maksim Pechnikov <parallel588@gmail.com> | 2020-05-08 08:51:09 +0300 |
|---|---|---|
| committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-05-08 08:51:09 +0300 |
| commit | b078e0567dbecc768f88d991a2565141eb9e8c50 (patch) | |
| tree | ed376fc3c17c6e508ac91d8e72cddad128c07c69 /test/support/factory.ex | |
| parent | bd261309cc27ebf5d2f78ea3c1474fe71ae8046d (diff) | |
| parent | 769d95644daf07bf27fb483e91d0e793eaa18bd8 (diff) | |
| download | pleroma-b078e0567dbecc768f88d991a2565141eb9e8c50.tar.gz pleroma-b078e0567dbecc768f88d991a2565141eb9e8c50.zip | |
Merge branch 'develop' into issue/1276-2
Diffstat (limited to 'test/support/factory.ex')
| -rw-r--r-- | test/support/factory.ex | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex index 495764782..c8c45e2a7 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -33,7 +33,8 @@ defmodule Pleroma.Factory do bio: sequence(:bio, &"Tester Number #{&1}"), last_digest_emailed_at: NaiveDateTime.utc_now(), last_refreshed_at: NaiveDateTime.utc_now(), - notification_settings: %Pleroma.User.NotificationSetting{} + notification_settings: %Pleroma.User.NotificationSetting{}, + multi_factor_authentication_settings: %Pleroma.MFA.Settings{} } %{ @@ -422,4 +423,13 @@ defmodule Pleroma.Factory do last_read_id: "1" } end + + def mfa_token_factory do + %Pleroma.MFA.Token{ + token: :crypto.strong_rand_bytes(32) |> Base.url_encode64(padding: false), + authorization: build(:oauth_authorization), + valid_until: NaiveDateTime.add(NaiveDateTime.utc_now(), 60 * 10), + user: build(:user) + } + end end |
