1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Fix tests in ClientRegistrationsTests

Issue gh-17542
This commit is contained in:
Joe Grandja
2025-07-16 17:00:14 -04:00
parent f0c5a85d9a
commit b8796d84b7
@@ -40,6 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.assertj.core.api.Assertions.assertThatNullPointerException;
/**
* @author Rob Winch
@@ -182,16 +183,14 @@ public class ClientRegistrationsTests {
@Test
public void issuerWhenResponseMissingJwksUriThenThrowsIllegalArgumentException() throws Exception {
this.response.remove("jwks_uri");
assertThatIllegalArgumentException().isThrownBy(() -> registration("").build())
.withMessageContaining("The public JWK set URI must not be null");
assertThatIllegalArgumentException().isThrownBy(() -> registration("").build());
}
// gh-7512
@Test
public void issuerWhenOidcFallbackResponseMissingJwksUriThenThrowsIllegalArgumentException() throws Exception {
this.response.remove("jwks_uri");
assertThatIllegalArgumentException().isThrownBy(() -> registrationOidcFallback("issuer1", null).build())
.withMessageContaining("The public JWK set URI must not be null");
assertThatIllegalArgumentException().isThrownBy(() -> registrationOidcFallback("issuer1", null).build());
}
// gh-7512
@@ -476,8 +475,7 @@ public class ClientRegistrationsTests {
@Test
public void issuerWhenOidcConfigurationResponseMissingJwksUriThenThrowsIllegalArgumentException() throws Exception {
this.response.remove("jwks_uri");
assertThatIllegalArgumentException().isThrownBy(() -> registration(this.response).build())
.withMessageContaining("The public JWK set URI must not be null");
assertThatNullPointerException().isThrownBy(() -> registration(this.response).build());
}
@Test