Allow folks a way to define an argument on a factory #88
james
commented 2024-06-05 13:42:40 +12:00
Owner
```elixir
factory MyApp.Accounts.User do
attribute :email, &Faker.Internet.email/0
argument :password, constant("password")
before_build(fn attrs ->
Map.put(attrs, :hashed_password, AshAuthentication.BcryptProvider.hash(attrs.password))
end)
end
```
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?