chore(tests): limpia warning xUnit2012 en CreateUsuario_WithInactiveRol_Returns400
Reemplaza Assert.True(enumerable.Any(...)) por Assert.Contains idiomatico.
This commit is contained in:
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user