ash_sqlite/test/type_test.exs

15 lines
324 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.{Api, Post}
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)))
|> Api.read!()
end
end