diff --git a/tests/SIGCM2.Application.Tests/Infrastructure/RefreshTokenRepositoryTests.cs b/tests/SIGCM2.Application.Tests/Infrastructure/RefreshTokenRepositoryTests.cs index ccd6313..ccbfd02 100644 --- a/tests/SIGCM2.Application.Tests/Infrastructure/RefreshTokenRepositoryTests.cs +++ b/tests/SIGCM2.Application.Tests/Infrastructure/RefreshTokenRepositoryTests.cs @@ -41,6 +41,9 @@ public class RefreshTokenRepositoryTests : IAsyncLifetime new Respawn.Graph.Table("dbo", "Rol_History"), new Respawn.Graph.Table("dbo", "Permiso_History"), new Respawn.Graph.Table("dbo", "RolPermiso_History"), + // ADM-001 (V011): Medio + Seccion are temporal — history tables cannot be directly deleted. + new Respawn.Graph.Table("dbo", "Medio_History"), + new Respawn.Graph.Table("dbo", "Seccion_History"), ] }); diff --git a/tests/SIGCM2.Application.Tests/Integration/PermisoRepositoryTests.cs b/tests/SIGCM2.Application.Tests/Integration/PermisoRepositoryTests.cs index d3b7653..1f31a32 100644 --- a/tests/SIGCM2.Application.Tests/Integration/PermisoRepositoryTests.cs +++ b/tests/SIGCM2.Application.Tests/Integration/PermisoRepositoryTests.cs @@ -74,12 +74,13 @@ public class PermisoRepositoryTests : IAsyncLifetime // ── ListAsync ──────────────────────────────────────────────────────────── [Fact] - public async Task ListAsync_Returns21CanonicalSeeds() + public async Task ListAsync_Returns22CanonicalSeeds() { var list = await _repository.ListAsync(); - // V005 seeds 18 canonical permisos + V007 (UDT-006) adds 3 admin permisos = 21 total - Assert.Equal(21, list.Count); + // V005 seeds 18 canonical permisos + V007 (UDT-006) adds 3 admin permisos + // + V011 (ADM-001) adds 'administracion:secciones:gestionar' = 22 total + Assert.Equal(22, list.Count); } [Fact] diff --git a/tests/SIGCM2.Application.Tests/Integration/RolPermisoRepositoryTests.cs b/tests/SIGCM2.Application.Tests/Integration/RolPermisoRepositoryTests.cs index acf0335..658f250 100644 --- a/tests/SIGCM2.Application.Tests/Integration/RolPermisoRepositoryTests.cs +++ b/tests/SIGCM2.Application.Tests/Integration/RolPermisoRepositoryTests.cs @@ -174,12 +174,13 @@ public class RolPermisoRepositoryTests : IAsyncLifetime // ── GetByRolCodigoAsync ────────────────────────────────────────────────── [Fact] - public async Task GetByRolCodigoAsync_Admin_Returns21Permisos() + public async Task GetByRolCodigoAsync_Admin_Returns22Permisos() { - // admin has 18 permisos from V006 + 3 new admin permisos from V007 (UDT-006) = 21 total + // admin has 18 permisos from V006 + 3 new admin permisos from V007 (UDT-006) + // + 1 from V011 (ADM-001): 'administracion:secciones:gestionar' = 22 total var permisos = await _repository.GetByRolCodigoAsync("admin"); - Assert.Equal(21, permisos.Count); + Assert.Equal(22, permisos.Count); } [Fact] diff --git a/tests/SIGCM2.Application.Tests/Integration/UsuarioRepositoryTests.cs b/tests/SIGCM2.Application.Tests/Integration/UsuarioRepositoryTests.cs index 6eabd33..053ae71 100644 --- a/tests/SIGCM2.Application.Tests/Integration/UsuarioRepositoryTests.cs +++ b/tests/SIGCM2.Application.Tests/Integration/UsuarioRepositoryTests.cs @@ -33,6 +33,9 @@ public class UsuarioRepositoryTests : IAsyncLifetime new Respawn.Graph.Table("dbo", "Rol_History"), new Respawn.Graph.Table("dbo", "Permiso_History"), new Respawn.Graph.Table("dbo", "RolPermiso_History"), + // ADM-001 (V011): Medio + Seccion are temporal — history tables cannot be directly deleted. + new Respawn.Graph.Table("dbo", "Medio_History"), + new Respawn.Graph.Table("dbo", "Seccion_History"), ] }); diff --git a/tests/SIGCM2.Application.Tests/Integration/UsuarioRepository_PermisosTests.cs b/tests/SIGCM2.Application.Tests/Integration/UsuarioRepository_PermisosTests.cs index 6418293..4395f32 100644 --- a/tests/SIGCM2.Application.Tests/Integration/UsuarioRepository_PermisosTests.cs +++ b/tests/SIGCM2.Application.Tests/Integration/UsuarioRepository_PermisosTests.cs @@ -37,6 +37,9 @@ public sealed class UsuarioRepository_PermisosTests : IAsyncLifetime new Respawn.Graph.Table("dbo", "Rol_History"), new Respawn.Graph.Table("dbo", "Permiso_History"), new Respawn.Graph.Table("dbo", "RolPermiso_History"), + // ADM-001 (V011): Medio + Seccion are temporal — history tables cannot be directly deleted. + new Respawn.Graph.Table("dbo", "Medio_History"), + new Respawn.Graph.Table("dbo", "Seccion_History"), ] }); diff --git a/tests/SIGCM2.Application.Tests/Integration/V009MigrationTests.cs b/tests/SIGCM2.Application.Tests/Integration/V009MigrationTests.cs index 281b24e..6c042f3 100644 --- a/tests/SIGCM2.Application.Tests/Integration/V009MigrationTests.cs +++ b/tests/SIGCM2.Application.Tests/Integration/V009MigrationTests.cs @@ -36,6 +36,9 @@ public sealed class V009MigrationTests : IAsyncLifetime new Respawn.Graph.Table("dbo", "Rol_History"), new Respawn.Graph.Table("dbo", "Permiso_History"), new Respawn.Graph.Table("dbo", "RolPermiso_History"), + // ADM-001 (V011): Medio + Seccion are temporal — history tables cannot be directly deleted. + new Respawn.Graph.Table("dbo", "Medio_History"), + new Respawn.Graph.Table("dbo", "Seccion_History"), ] });