mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +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?)})
|
change set_context(%{authorize?: arg(:authorize?)})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
update :update_with_match do
|
||||||
|
validate match(:title4, ~r/^[a-z]+$/)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
identities do
|
identities do
|
||||||
|
@ -216,10 +220,6 @@ defmodule Ash.Test.Actions.BulkUpdateTest do
|
||||||
|
|
||||||
timestamps()
|
timestamps()
|
||||||
end
|
end
|
||||||
|
|
||||||
validations do
|
|
||||||
validate match(:title4, ~r/^[a-z]+$/)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "returns updated records" do
|
test "returns updated records" do
|
||||||
|
@ -446,7 +446,7 @@ defmodule Ash.Test.Actions.BulkUpdateTest do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "runs global validations with atomic_batches strategy" do
|
test "runs match validation with atomic_batches strategy" do
|
||||||
assert %Ash.BulkResult{
|
assert %Ash.BulkResult{
|
||||||
error_count: 1
|
error_count: 1
|
||||||
} =
|
} =
|
||||||
|
@ -458,7 +458,7 @@ defmodule Ash.Test.Actions.BulkUpdateTest do
|
||||||
|> Stream.map(fn {:ok, result} ->
|
|> Stream.map(fn {:ok, result} ->
|
||||||
result
|
result
|
||||||
end)
|
end)
|
||||||
|> Ash.bulk_update(:update, %{title4: "INVALID"},
|
|> Ash.bulk_update(:update_with_match, %{title4: "INVALID"},
|
||||||
strategy: :atomic_batches,
|
strategy: :atomic_batches,
|
||||||
resource: Post,
|
resource: Post,
|
||||||
return_errors?: true,
|
return_errors?: true,
|
||||||
|
|
Loading…
Reference in a new issue