Polish "Remove usages of BasicAuthorizationInterceptor"
Closes gh-14830
This commit is contained in:
parent
8b14754cda
commit
1e6851cf81
|
@ -330,6 +330,16 @@ public class RestTemplateBuilderTests {
|
|||
assertThat(interceptor).extracting("password").containsExactly("boot");
|
||||
}
|
||||
|
||||
@Test
|
||||
@Deprecated
|
||||
public void basicAuthorizationShouldApply() {
|
||||
RestTemplate template = this.builder.basicAuthorization("spring", "boot").build();
|
||||
ClientHttpRequestInterceptor interceptor = template.getInterceptors().get(0);
|
||||
assertThat(interceptor).isInstanceOf(BasicAuthenticationInterceptor.class);
|
||||
assertThat(interceptor).extracting("username").containsExactly("spring");
|
||||
assertThat(interceptor).extracting("password").containsExactly("boot");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void customizersWhenCustomizersAreNullShouldThrowException() {
|
||||
assertThatIllegalArgumentException()
|
||||
|
|
Loading…
Reference in New Issue