ash_sqlite/test/type_test.exs

15 lines
317 B
Elixir
Raw Normal View History

2023-09-23 14:52:22 +12:00
defmodule AshSqlite.Test.TypeTest do
use AshSqlite.RepoCase, async: false
alias AshSqlite.Test.Post
2023-09-23 14:52:22 +12:00
require Ash.Query
test "uuids can be used as strings in fragments" do
uuid = Ash.UUID.generate()
Post
|> Ash.Query.filter(fragment("? = ?", id, type(^uuid, :uuid)))
|> Ash.read!()
2023-09-23 14:52:22 +12:00
end
end