REPO-2644: REST API: Delete Application Audit Entries - add TAS-level sanity test

Refactor existing TAS test.
This commit is contained in:
Alexandru-Eusebiu Epure
2017-07-20 15:29:24 +03:00
parent edad414caf
commit 59be5d5cec
@@ -48,10 +48,12 @@ public class DeleteAuditCoreTests extends AuditTest
String secondId = restAuditEntryCollection.getEntries().get(restAuditEntryCollection.getPagination().getCount() - 1)
.onModel().getId();
restClient.authenticateUser(userModel).withParams("where=(id BETWEEN ("+firstId+","+secondId+"))").withCoreAPI().usingAudit().deleteAuditEntriesForAnAuditApplication(restAuditAppModel.getId());
restClient.authenticateUser(userModel).withParams("where=(id BETWEEN (" + firstId + "," + secondId + "))").withCoreAPI()
.usingAudit().deleteAuditEntriesForAnAuditApplication(restAuditAppModel.getId());
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);
restClient.authenticateUser(adminUser).withParams("where=(id BETWEEN ("+firstId+","+secondId+"))").withCoreAPI().usingAudit().deleteAuditEntriesForAnAuditApplication(restAuditAppModel.getId());
restClient.authenticateUser(adminUser).withParams("where=(id BETWEEN (" + firstId + "," + secondId + "))").withCoreAPI()
.usingAudit().deleteAuditEntriesForAnAuditApplication(restAuditAppModel.getId());
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
restAuditEntryCollection = restClient.authenticateUser(adminUser).withParams("where=(id BETWEEN ("+firstId+","+secondId+"))").withCoreAPI().usingAudit()