Update validation for NotNull items in IncomingMessagesList

This commit is contained in:
Chris Eager authored and Jon Chambers committed 2021-07-27 10:39:30 -04:00
1 parent 3608c5bfb0
commit 13447df1e0
3 files changed
+23 -6

No files matched your search

@@ -247,6 +247,19 @@ class MessageControllerTest {
assertTrue(captor.getValue().hasSourceDevice());
}
@Test
void testNullMessageInList() throws Exception {
Response response =
resources.getJerseyTest()
.target(String.format("/v1/messages/%s", SINGLE_DEVICE_RECIPIENT))
.request()
.header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_NUMBER, AuthHelper.VALID_PASSWORD))
.put(Entity.entity(mapper.readValue(jsonFixture("fixtures/current_message_null_message_in_list.json"), IncomingMessageList.class),
MediaType.APPLICATION_JSON_TYPE));
assertThat("Bad request", response.getStatus(), is(equalTo(422)));
}
@Test
void testInternationalUnsealedSenderFromRateLimitedHost() throws Exception {
final String senderHost = "10.0.0.1";