test: adapt tests for attribute-level default solution

This commit is contained in:
Moritz 2026-01-25 13:39:18 +01:00
parent e7bf777be2
commit 8f3fd9d0d7
Signed by: moritz
GPG key ID: 1020A035E5DD0824
4 changed files with 37 additions and 20 deletions

View file

@ -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