feat: add user to member linking
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
0135dafa3a
commit
ad51a226f7
22 changed files with 2116 additions and 80 deletions
33
test/accounts/debug_changeset_test.exs
Normal file
33
test/accounts/debug_changeset_test.exs
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue