feat: add user to member linking
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Moritz 2025-11-13 22:31:32 +01:00
parent 0135dafa3a
commit ad51a226f7
Signed by: moritz
GPG key ID: 1020A035E5DD0824
22 changed files with 2116 additions and 80 deletions

View file

@ -0,0 +1,33 @@
defmodule Mv.Accounts.DebugChangesetTest do
use Mv.DataCase, async: true
alias Mv.Accounts
alias Mv.Membership
test "debug: what's in the changeset when linking with same email" do
# Create member
{:ok, member} =
Membership.create_member(%{
first_name: "Emma",
last_name: "Davis",
email: "emma@example.com"
})
IO.puts("\n=== MEMBER CREATED ===")
IO.puts("Member ID: #{member.id}")
IO.puts("Member Email: #{member.email}")
# Try to create user with same email and link
IO.puts("\n=== ATTEMPTING TO CREATE USER WITH LINK ===")
# Let's intercept the validation to see what's in the changeset
result =
Accounts.create_user(%{
email: "emma@example.com",
member: %{id: member.id}
})
IO.puts("\n=== RESULT ===")
IO.inspect(result, label: "Result")
end
end