feat(api): ProductTypesController + ExceptionFilter 4 casos PRD-001
CRUD endpoints con validación FluentValidation inline; 4 nuevas excepciones mapeadas en ExceptionFilter; conteos de permisos 25→26 actualizados; 12 e2e tests nuevos.
This commit is contained in:
@@ -129,7 +129,7 @@ public sealed class PermisosEndpointTests : IAsyncLifetime
|
||||
// ── GET /api/v1/permisos — catalog ───────────────────────────────────────
|
||||
|
||||
[Fact]
|
||||
public async Task GetPermisos_WithAdmin_Returns200With25Items()
|
||||
public async Task GetPermisos_WithAdmin_Returns200With26Items()
|
||||
{
|
||||
var token = await GetBearerTokenAsync(AdminUsername, AdminPassword);
|
||||
using var req = BuildRequest(HttpMethod.Get, "/api/v1/permisos", bearerToken: token);
|
||||
@@ -140,8 +140,9 @@ public sealed class PermisosEndpointTests : IAsyncLifetime
|
||||
// V011 (ADM-001) adds 'administracion:secciones:gestionar' → 22
|
||||
// V013 (ADM-008) adds 'administracion:puntos_de_venta:gestionar' → 23
|
||||
// V014 (ADM-009) adds 'administracion:fiscal:gestionar' → 24
|
||||
// V016 (CAT-001) adds 'catalogo:rubros:gestionar' → 25 total
|
||||
Assert.Equal(25, list.GetArrayLength());
|
||||
// V016 (CAT-001) adds 'catalogo:rubros:gestionar' → 25
|
||||
// V017 (PRD-001) adds 'catalogo:tipos:gestionar' → 26 total
|
||||
Assert.Equal(26, list.GetArrayLength());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -184,7 +185,7 @@ public sealed class PermisosEndpointTests : IAsyncLifetime
|
||||
// ── GET /api/v1/roles/{codigo}/permisos ──────────────────────────────────
|
||||
|
||||
[Fact]
|
||||
public async Task GetRolPermisos_AdminRol_Returns200With25Items()
|
||||
public async Task GetRolPermisos_AdminRol_Returns200With26Items()
|
||||
{
|
||||
var token = await GetBearerTokenAsync(AdminUsername, AdminPassword);
|
||||
using var req = BuildRequest(HttpMethod.Get, "/api/v1/roles/admin/permisos", bearerToken: token);
|
||||
@@ -195,8 +196,9 @@ public sealed class PermisosEndpointTests : IAsyncLifetime
|
||||
// V011 (ADM-001) adds 'administracion:secciones:gestionar' → 22
|
||||
// V013 (ADM-008) adds 'administracion:puntos_de_venta:gestionar' → 23
|
||||
// V014 (ADM-009) adds 'administracion:fiscal:gestionar' → 24
|
||||
// V016 (CAT-001) adds 'catalogo:rubros:gestionar' → 25 total
|
||||
Assert.Equal(25, list.GetArrayLength());
|
||||
// V016 (CAT-001) adds 'catalogo:rubros:gestionar' → 25
|
||||
// V017 (PRD-001) adds 'catalogo:tipos:gestionar' → 26 total
|
||||
Assert.Equal(26, list.GetArrayLength());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user