chore(tests): limpia warning xUnit2012 en CreateUsuario_WithInactiveRol_Returns400

Reemplaza Assert.True(enumerable.Any(...)) por Assert.Contains idiomatico.
This commit is contained in:
2026-04-15 13:03:18 -03:00
parent fae06fb8b8
commit 57e4cdac01

View File

@@ -421,7 +421,7 @@ public sealed class CreateUsuarioEndpointTests : IAsyncLifetime
var json = await resp.Content.ReadFromJsonAsync<JsonElement>(); var json = await resp.Content.ReadFromJsonAsync<JsonElement>();
Assert.True(json.TryGetProperty("errors", out var errors), "Response must contain 'errors'"); Assert.True(json.TryGetProperty("errors", out var errors), "Response must contain 'errors'");
// Validation error should be on the Rol field // Validation error should be on the Rol field
Assert.True(errors.EnumerateObject().Any(p => p.Name.Equals("Rol", StringComparison.OrdinalIgnoreCase))); Assert.Contains(errors.EnumerateObject(), p => p.Name.Equals("Rol", StringComparison.OrdinalIgnoreCase));
} }
finally finally
{ {