1 defmodule Pleroma.Builders.UserBuilder do
5 def build(data \\ %{}) do
7 email: "test@example.org",
10 password_hash: Pleroma.Password.Pbkdf2.hash_pwd_salt("test"),
13 last_digest_emailed_at: NaiveDateTime.truncate(NaiveDateTime.utc_now(), :second),
14 multi_factor_authentication_settings: %Pleroma.MFA.Settings{},
15 notification_settings: %Pleroma.User.NotificationSetting{}
21 def insert(data \\ %{}) do
22 {:ok, user} = Repo.insert(build(data))
23 User.invalidate_cache(user)