|
|
@ -85,4 +85,19 @@ class ServerAppTest |
|
|
|
assertEquals(200, res.getStatus()); |
|
|
|
then(accessController).should().login(any(), any()); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void testLogout() |
|
|
|
{ |
|
|
|
when(accessController.logout(any(), any())).thenReturn("Test"); |
|
|
|
|
|
|
|
String url = "/accounts/logout"; |
|
|
|
|
|
|
|
ApiTestUtils.TestResponse<String> res = new ApiTestUtils<String>() |
|
|
|
.request("POST", url, null, null, String.class); |
|
|
|
|
|
|
|
assertNotNull(res); |
|
|
|
assertEquals(200, res.getStatus()); |
|
|
|
then(accessController).should().logout(any(), any()); |
|
|
|
} |
|
|
|
} |