Skip to content

Commit 1a0c131

Browse files
committed
Remove invalid test.
1 parent 16a674f commit 1a0c131

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

src/test/kotlin/au/kilemon/messagequeue/rest/controller/AuthControllerTest.kt

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -285,33 +285,6 @@ class AuthControllerTest
285285
.andExpect(MockMvcResultMatchers.status().isNoContent)
286286
}
287287

288-
/**
289-
* Ensure [AuthController.removeRestrictionFromSubQueue] returns
290-
* [org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR] when there is an error when attempting to remove
291-
* the restriction on the sub-queue.
292-
*/
293-
@Test
294-
fun testRemoveRestrictionFromSubQueue_failedToRemoveRestriction()
295-
{
296-
Mockito.doReturn(RestrictionMode.HYBRID).`when`(multiQueueAuthenticator).getRestrictionMode()
297-
Assertions.assertEquals(RestrictionMode.HYBRID, multiQueueAuthenticator.getRestrictionMode())
298-
299-
val subQueue = "testRemoveRestrictionFromSubQueue_failedToRemoveRestriction"
300-
val token = jwtTokenProvider.createTokenForSubQueue(subQueue)
301-
Assertions.assertTrue(token.isPresent)
302-
303-
Assertions.assertTrue(multiQueueAuthenticator.addRestrictedEntry(subQueue))
304-
Assertions.assertTrue(multiQueueAuthenticator.isRestricted(subQueue))
305-
306-
Mockito.doReturn(false).`when`(multiQueueAuthenticator).removeRestriction(subQueue)
307-
308-
mockMvc.perform(
309-
MockMvcRequestBuilders.delete("${AuthController.AUTH_PATH}/${subQueue}")
310-
.header(JwtAuthenticationFilter.AUTHORIZATION_HEADER, "${JwtAuthenticationFilter.BEARER_HEADER_VALUE}${token.get()}")
311-
.contentType(MediaType.APPLICATION_JSON_VALUE))
312-
.andExpect(MockMvcResultMatchers.status().isInternalServerError)
313-
}
314-
315288
/**
316289
* Ensure [AuthController.removeRestrictionFromSubQueue] returns [org.springframework.http.HttpStatus.OK] when
317290
* the sub-queue restriction is removed BUT the sub-queue is not cleared when the query parameter

0 commit comments

Comments
 (0)