fix: use direct changeset to confirm test user email

Accounts.confirm_user_email/1 doesn't exist - the module only has confirm_user/1
which requires a token. For seeding, we can directly set confirmed_at timestamp
using Ecto.Changeset.change/2.
This commit is contained in:
Graham McIntire 2026-03-08 11:53:47 -05:00
parent e7a25a5f2c
commit 9e236225b1
No known key found for this signature in database

View file

@ -21,8 +21,11 @@ test_totp_secret = "JBSWY3DPEHPK3PXP"
privacy_policy_consent: true
})
# Confirm the user's email
{:ok, _user} = Accounts.confirm_user_email(user.email)
# Confirm the user's email directly (bypass token flow for seeding)
{:ok, user} =
user
|> Ecto.Changeset.change(%{confirmed_at: DateTime.truncate(DateTime.utc_now(), :second)})
|> Repo.update()
# Enable TOTP for the user
{:ok, _credential} =