Open macfarla opened 2 years ago
@Test public void receiveRawValidations() { assertThat(jersey.target("receiveraw").request().header("c11n-key", null).get().getStatus()) .describedAs("key header cannot be null") .isEqualTo(400);
assertThat(jersey.target("receiveraw").request().get().getStatus()).isEqualTo(400); assertThat(jersey.target("receiveraw").request().header("c11n-key", "notbase64").get().getStatus()) .describedAs("key header must be valid base64") .isEqualTo(400); String validBase64Encoded = Base64.getEncoder().encodeToString("VALIDKEY".getBytes()); assertThat( jersey.target("receiveraw") .request() .header("c11n-key", validBase64Encoded) .header("c11n-to", "notbase64") .get() .getStatus()) .describedAs("to header must be valid base64") .isEqualTo(400);
}
@Test public void receiveRawValidations() { assertThat(jersey.target("receiveraw").request().header("c11n-key", null).get().getStatus()) .describedAs("key header cannot be null") .isEqualTo(400);
}