From 68d1478cbcc226ef104b8eed90f85704e3ae6f64 Mon Sep 17 00:00:00 2001 From: "Alexandre DUVAL - @kannarfr" Date: Mon, 20 Nov 2023 19:13:19 +0100 Subject: [PATCH] fix test --- .../biscuitpulsar/AuthenticationProviderBiscuitTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/clevercloud/biscuitpulsar/AuthenticationProviderBiscuitTest.java b/src/test/java/com/clevercloud/biscuitpulsar/AuthenticationProviderBiscuitTest.java index 72eeeca..d3913bc 100644 --- a/src/test/java/com/clevercloud/biscuitpulsar/AuthenticationProviderBiscuitTest.java +++ b/src/test/java/com/clevercloud/biscuitpulsar/AuthenticationProviderBiscuitTest.java @@ -140,7 +140,10 @@ public void testTokenFromHttpParams() throws Exception { doReturn(0).when(servletRequest).getRemotePort(); AuthenticationState authState = provider.newHttpAuthState(servletRequest); - provider.authenticate(authState.getAuthDataSource()); + String subject = provider.authenticate(authState.getAuthDataSource()); + assertThat(subject, new StringStartsWith("biscuit:")); + + provider.close(); } @Test @@ -170,6 +173,8 @@ public void testTokenFromHttpHeaders() throws Exception { doReturn(0).when(servletRequest).getRemotePort(); AuthenticationState authState = provider.newHttpAuthState(servletRequest); - provider.authenticate(authState.getAuthDataSource()); + String subject = provider.authenticate(authState.getAuthDataSource()); + assertThat(subject, new StringStartsWith("biscuit:")); + provider.close(); } }