mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-21 05:53:18 +12:00
15 lines
460 B
Elixir
15 lines
460 B
Elixir
|
defmodule AshPostgres.Test.PrimaryKeyTest do
|
||
|
use AshPostgres.RepoCase, async: false
|
||
|
alias AshPostgres.Test.{Api, IntegerPost, Post}
|
||
|
|
||
|
require Ash.Query
|
||
|
|
||
|
test "creates resource with integer primary key" do
|
||
|
assert %IntegerPost{} = IntegerPost |> Ash.Changeset.new(%{title: "title"}) |> Api.create!()
|
||
|
end
|
||
|
|
||
|
test "creates resource with uuid primary key" do
|
||
|
assert %Post{} = Post |> Ash.Changeset.new(%{title: "title"}) |> Api.create!()
|
||
|
end
|
||
|
end
|