add audit journal log for hs_office_person
This commit is contained in:
@@ -20,6 +20,7 @@ import org.springframework.test.annotation.DirtiesContext;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -265,6 +266,24 @@ class HsOfficePersonRepositoryIntegrationTest extends ContextBasedTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void auditJournalLogIsAvailable() {
|
||||
// given
|
||||
final var query = em.createNativeQuery("""
|
||||
select c.currenttask, j.targettable, j.targetop
|
||||
from tx_journal j
|
||||
join tx_context c on j.txid = c.txid
|
||||
where targettable = 'hs_office_person';
|
||||
""");
|
||||
|
||||
// when
|
||||
@SuppressWarnings("unchecked") final List<Object[]> customerLogEntries = query.getResultList();
|
||||
|
||||
// then
|
||||
assertThat(customerLogEntries).map(Arrays::toString)
|
||||
.contains("[creating RBAC test person First GmbH, hs_office_person, INSERT]");
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void cleanup() {
|
||||
context("superuser-alex@hostsharing.net", null);
|
||||
|
Reference in New Issue
Block a user