Skip to content

Commit aef6bad

Browse files
committed
another sonar finding, remove unused parameters
1 parent 217f918 commit aef6bad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/src/test/java/dev/findfirst/security/oauth2/Oauth2LoginSuccessHandlerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ class Oauth2LoginSuccessHandlerTest {
6161
@DisplayName("Authenticate active Github user")
6262
void authenticateGithubUser() throws Exception {
6363
oAuthHandler.setRedirectURL("localhost");
64-
authenticateUserByProvider("github");
64+
authenticateUserByProvider();
6565
}
6666

67-
private void authenticateUserByProvider(String provider) throws Exception {
68-
OAuth2AuthenticationToken oAuthToken = mockAuthentication(provider.toLowerCase()).getFirst();
67+
private void authenticateUserByProvider() throws Exception {
68+
OAuth2AuthenticationToken oAuthToken = mockAuthentication().getFirst();
6969

7070
MockHttpServletResponse response = new MockHttpServletResponse();
7171
oAuthHandler.onAuthenticationSuccess(new MockHttpServletRequest(), response, oAuthToken);
@@ -74,7 +74,7 @@ private void authenticateUserByProvider(String provider) throws Exception {
7474
assertEquals("localhost/account/login/oauth2", response.getRedirectedUrl());
7575
}
7676

77-
private Entry<OAuth2AuthenticationToken, OAuth2User> mockAuthentication(String provider) {
77+
private Entry<OAuth2AuthenticationToken, OAuth2User> mockAuthentication() {
7878
OAuth2AuthenticationToken oauthToken = mock(OAuth2AuthenticationToken.class);
7979
OAuth2User principal = mock(OAuth2User.class);
8080
Map<String, Object> attributes = new HashMap<>();

0 commit comments

Comments
 (0)