This commit is contained in:
Phillip Webb
2017-09-27 17:44:30 -07:00
parent 7e2d7dcd1d
commit 9e43b99966
42 changed files with 190 additions and 200 deletions

View File

@@ -57,16 +57,14 @@ public class SampleSecureWebFluxApplicationTests {
@Test
public void userDefinedMappingsAccessibleOnLogin() {
this.webClient.get().uri("/").accept(MediaType.APPLICATION_JSON)
.header("Authorization", "basic " + getBasicAuth())
.exchange()
.header("Authorization", "basic " + getBasicAuth()).exchange()
.expectBody(String.class).isEqualTo("Hello foo");
}
@Test
public void actuatorsAccessibleOnLogin() {
this.webClient.get().uri("/application/status").accept(MediaType.APPLICATION_JSON)
.header("Authorization", "basic " + getBasicAuth())
.exchange()
.header("Authorization", "basic " + getBasicAuth()).exchange()
.expectBody(String.class).isEqualTo("{\"status\":\"UP\"}");
}
@@ -74,4 +72,4 @@ public class SampleSecureWebFluxApplicationTests {
return new String(Base64.getEncoder().encode(("foo:password").getBytes()));
}
}
}