This commit is contained in:
Ken Stevens 2019-07-17 13:28:17 -04:00
parent fe21dba4a6
commit d21304e771
1 changed files with 7 additions and 1 deletions

View File

@ -59,13 +59,19 @@ public class ExpungeHookTest {
public void expungeEverythingHook() throws InterruptedException {
IIdType id = myPatientDao.create(new Patient()).getId();
assertNotNull(myPatientDao.read(id));
myEverythingLatch.setExpectedCount(1);
ExpungeOptions options = new ExpungeOptions();
options.setExpungeEverything(true);
myExpungeService.expunge(null, null, null, options, null);
myEverythingLatch.awaitExpected();
assertPatientGone(id);
}
private void assertPatientGone(IIdType theId) {
try {
myPatientDao.read(id);
myPatientDao.read(theId);
fail();
} catch (ResourceNotFoundException e) {
assertThat(e.getMessage(), containsString("is not known"));