mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 21:13:10 +12:00
fix: ensure only the intended failing test fails (#1105)
It was making also other tests fail
This commit is contained in:
parent
0efa1a0a10
commit
a3418e32ef
1 changed files with 6 additions and 6 deletions
|
@ -168,6 +168,10 @@ defmodule Ash.Test.Actions.BulkUpdateTest do
|
|||
|
||||
change set_context(%{authorize?: arg(:authorize?)})
|
||||
end
|
||||
|
||||
update :update_with_match do
|
||||
validate match(:title4, ~r/^[a-z]+$/)
|
||||
end
|
||||
end
|
||||
|
||||
identities do
|
||||
|
@ -216,10 +220,6 @@ defmodule Ash.Test.Actions.BulkUpdateTest do
|
|||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
validations do
|
||||
validate match(:title4, ~r/^[a-z]+$/)
|
||||
end
|
||||
end
|
||||
|
||||
test "returns updated records" do
|
||||
|
@ -446,7 +446,7 @@ defmodule Ash.Test.Actions.BulkUpdateTest do
|
|||
)
|
||||
end
|
||||
|
||||
test "runs global validations with atomic_batches strategy" do
|
||||
test "runs match validation with atomic_batches strategy" do
|
||||
assert %Ash.BulkResult{
|
||||
error_count: 1
|
||||
} =
|
||||
|
@ -458,7 +458,7 @@ defmodule Ash.Test.Actions.BulkUpdateTest do
|
|||
|> Stream.map(fn {:ok, result} ->
|
||||
result
|
||||
end)
|
||||
|> Ash.bulk_update(:update, %{title4: "INVALID"},
|
||||
|> Ash.bulk_update(:update_with_match, %{title4: "INVALID"},
|
||||
strategy: :atomic_batches,
|
||||
resource: Post,
|
||||
return_errors?: true,
|
||||
|
|
Loading…
Reference in a new issue