Skip to content

Commit

Permalink
GRAD2-2973 - Adding test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kamal-mohammed committed Nov 13, 2024
1 parent ad49285 commit 70af686
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void testReloadSchoolsIntoCache_shouldReturnOK() throws Exception {
@Test
void testReloadSchoolsIntoCache_shouldReturnUnprocessableEntity() throws Exception {
SchoolService schoolServiceMock = mock(SchoolService.class);
doThrow(Exception.class).when(schoolServiceMock).initializeSchoolCache(true);
doThrow(RuntimeException.class).when(schoolServiceMock).initializeSchoolCache(true);
mockMvc.perform(MockMvcRequestBuilders.put("/api/v2/trax/school/cache/schools")
.with(jwt().jwt(jwt -> jwt.claim("scope", "UPDATE_GRAD_TRAX_CACHE")))
.accept(MediaType.APPLICATION_JSON))
Expand All @@ -178,7 +178,7 @@ void testReloadSchoolDetailssIntoCache_shouldReturnOK() throws Exception {
@Test
void testReloadSchoolDetailsIntoCache_shouldReturnUnprocessableEntity() throws Exception {
SchoolService schoolServiceMock = mock(SchoolService.class);
doThrow(Exception.class).when(schoolServiceMock).initializeSchoolDetailCache(true);
doThrow(RuntimeException.class).when(schoolServiceMock).initializeSchoolDetailCache(true);
mockMvc.perform(MockMvcRequestBuilders.put("/api/v2/trax/school/cache/school-details")
.with(jwt().jwt(jwt -> jwt.claim("scope", "UPDATE_GRAD_TRAX_CACHE")))
.accept(MediaType.APPLICATION_JSON))
Expand Down

0 comments on commit 70af686

Please sign in to comment.