mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 13:33:50 +12:00
e8643d4aa0
chore: update tests not to use deprecated helper
21 lines
500 B
Elixir
21 lines
500 B
Elixir
defmodule AshPostgres.EmbeddableResourceTest do
|
|
@moduledoc false
|
|
use AshPostgres.RepoCase, async: false
|
|
alias AshPostgres.Test.{Api, Post}
|
|
|
|
require Ash.Query
|
|
|
|
setup do
|
|
post =
|
|
Post
|
|
|> Ash.Changeset.new(%{title: "title"})
|
|
|> Api.create!()
|
|
|
|
%{post: post}
|
|
end
|
|
|
|
test "calculations can load json", %{post: post} do
|
|
assert %{calc_returning_json: %AshPostgres.Test.Money{amount: 100, currency: :usd}} =
|
|
Api.load!(post, :calc_returning_json)
|
|
end
|
|
end
|