Polish "Remove usages of BasicAuthorizationInterceptor"

Closes gh-14830
pull/14843/merge
Stephane Nicoll 6 years ago
parent 8b14754cda
commit 1e6851cf81

@ -330,6 +330,16 @@ public class RestTemplateBuilderTests {
assertThat(interceptor).extracting("password").containsExactly("boot"); 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 @Test
public void customizersWhenCustomizersAreNullShouldThrowException() { public void customizersWhenCustomizersAreNullShouldThrowException() {
assertThatIllegalArgumentException() assertThatIllegalArgumentException()

Loading…
Cancel
Save