fix(frontend): keep entity and message deletes in sync

This commit is contained in:
2026-03-27 03:38:41 -03:00
parent 726c8f3afd
commit 433874d11e
7 changed files with 112 additions and 4 deletions

View File

@@ -62,6 +62,17 @@ class VirtualEntityControllerTest {
.andExpect(status().isOk).andExpect(jsonPath("$").isArray).andExpect(jsonPath("$[0].name").value("Test Entity"))
}
@Test
fun should_returnOnlyActiveEntities_when_getAllEntities() {
virtualEntityRepository.save(VirtualEntity(name = "Active Entity", email = "active@condado.com", jobTitle = "Tester", active = true))
virtualEntityRepository.save(VirtualEntity(name = "Inactive Entity", email = "inactive@condado.com", jobTitle = "Tester", active = false))
mockMvc.perform(get("/api/v1/virtual-entities").cookie(authCookie()))
.andExpect(status().isOk)
.andExpect(jsonPath("$.length()").value(1))
.andExpect(jsonPath("$[0].name").value("Active Entity"))
}
@Test
fun should_return200AndEntity_when_getById() {
val entity = virtualEntityRepository.save(VirtualEntity(name = "Test Entity", email = "entity@condado.com", jobTitle = "Test Job"))