fix(frontend): keep entity and message deletes in sync
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user