ash_phoenix/test/support/resources/post_with_default.ex
Josh Price ad5f1c4b5e
test: set primary action explicitly in tests (#38)
* test: set primary action explicitly

* chore: update all deps
2022-05-16 15:34:33 -04:00

17 lines
311 B
Elixir

defmodule AshPhoenix.Test.PostWithDefault do
@moduledoc false
use Ash.Resource, data_layer: Ash.DataLayer.Ets
ets do
private?(true)
end
actions do
defaults([:create])
end
attributes do
uuid_primary_key(:id)
attribute(:text, :string, allow_nil?: false, default: "foo")
end
end