Skip to content

Commit

Permalink
resolved some code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
harshadk-sourcefuse committed Oct 4, 2023
1 parent ef6dc4d commit aa1bf81
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import com.sourcefuse.jarc.services.authservice.oauth2.user.GoogleOAuth2UserInfo;
import com.sourcefuse.jarc.services.authservice.oauth2.user.OAuth2UserInfo;
import java.util.HashMap;
import java.util.Map;

import org.junit.jupiter.api.Test;
import org.springframework.security.oauth2.core.OAuth2AuthenticationException;

Expand Down Expand Up @@ -43,12 +45,13 @@ void testGetOAuth2UserInfoSuccessForProviderGithub() {

@Test
void testGetOAuth2UserInfoThrowErrorWhenProviderIsNotSupported() {
Map<String, Object> attributes = new HashMap<>();
assertThrows(
OAuth2AuthenticationException.class,
() ->
OAuth2UserInfoService.getOAuth2UserInfo(
"instagram",
new HashMap<String, Object>()
attributes
)
);
}
Expand Down

0 comments on commit aa1bf81

Please sign in to comment.