mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 01:02:14 +00:00
Polish ClientRegistrationsTests
Simplified the assertion so that it is focused on the core behavior being verified. This will likely also make the test more stable when updating Spring Framework versions. Issue gh-16860
This commit is contained in:
parent
0e84f31a00
commit
f631a0fcd5
@ -471,15 +471,11 @@ public class ClientRegistrationsTests {
|
||||
return new MockResponse().setResponseCode(responseCode);
|
||||
}
|
||||
});
|
||||
String message = """
|
||||
Unable to resolve Configuration with the provided Issuer of "%s", errors: [\
|
||||
405 Client Error: [no body], \
|
||||
400 Client Error: [no body], \
|
||||
404 Client Error: [no body]]\
|
||||
""".formatted(this.issuer);
|
||||
assertThatExceptionOfType(IllegalArgumentException.class)
|
||||
.isThrownBy(() -> ClientRegistrations.fromIssuerLocation(this.issuer).build())
|
||||
.withMessage(message);
|
||||
.withMessageContaining("405")
|
||||
.withMessageContaining("400")
|
||||
.withMessageContaining("404");
|
||||
}
|
||||
|
||||
private ClientRegistration.Builder registration(String path) throws Exception {
|
||||
|
Loading…
x
Reference in New Issue
Block a user