test: adapt tests for attribute-level default solution
This commit is contained in:
parent
e7bf777be2
commit
8f3fd9d0d7
4 changed files with 37 additions and 20 deletions
|
|
@ -354,9 +354,14 @@ defmodule Mv.Accounts.UserPoliciesTest do
|
|||
})
|
||||
|> Ash.Changeset.set_context(%{private: %{ash_authentication?: true}})
|
||||
|
||||
{:ok, user} = Ash.create(changeset)
|
||||
{:ok, user} = Ash.create(changeset, domain: Mv.Accounts)
|
||||
|
||||
assert user.email
|
||||
|
||||
# Verify that default "Mitglied" role was assigned
|
||||
{:ok, user_with_role} = Ash.load(user, :role, domain: Mv.Accounts, authorize?: false)
|
||||
assert user_with_role.role != nil
|
||||
assert user_with_role.role.name == "Mitglied"
|
||||
end
|
||||
|
||||
test "register_with_rauthy works without actor via AshAuthentication bypass" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue