From 9e236225b1df8c17deb66e652387fe6a2e6e62f4 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 8 Mar 2026 11:53:47 -0500 Subject: [PATCH] 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. --- priv/repo/seeds_e2e.exs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/priv/repo/seeds_e2e.exs b/priv/repo/seeds_e2e.exs index 0f769365..5d9cd352 100644 --- a/priv/repo/seeds_e2e.exs +++ b/priv/repo/seeds_e2e.exs @@ -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} =