mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 13:33:50 +12:00
17 lines
435 B
Elixir
17 lines
435 B
Elixir
defmodule AshPostgres.ManualUpdateTest do
|
|
use AshPostgres.RepoCase, async: true
|
|
|
|
test "Manual update defined in a module to update an attribute" do
|
|
post =
|
|
AshPostgres.Test.Post
|
|
|> Ash.Changeset.new(%{title: "match"})
|
|
|> AshPostgres.Test.Api.create!()
|
|
|
|
post =
|
|
post
|
|
|> Ash.Changeset.for_update(:manual_update)
|
|
|> AshPostgres.Test.Api.update!()
|
|
|
|
assert post.title == "manual"
|
|
end
|
|
end
|