Skip to content

Commit

Permalink
fix failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Paurikova2 committed Jun 15, 2023
1 parent 0aef050 commit 68fc77b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down Expand Up @@ -58,7 +59,10 @@ public void createHandleTest() throws Exception {
assertNull(handle.getDSpaceObject());
//clean all
context.turnOffAuthorisationSystem();
handleService.delete(context, handle);
List<Handle> handles = handleService.findAll(context);
for (Handle h: handles) {
handleService.delete(context, h);
}
context.restoreAuthSystemState();
}
}

0 comments on commit 68fc77b

Please sign in to comment.