Testing with AshAuthentication after upgrade
After upgrading
ash_authentication_phoenix
and ash_authentication
to 2.10.0
and 2.9.2
, this test helper function raises an error.
Looks like it's because I'm creating users for test using Ash.Seed.seed!
, so nothing is populating token
.
What would be a sensible fix here?3 Replies
Solution
🤔 You could generate a token and put it into
__metadata__
With
AshAuthentication.Jwt.token_for_user
this works well: