mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-22 02:18:05 +01:00
Update validation for NotNull items in IncomingMessagesList
This commit is contained in:
committed by
Jon Chambers
parent
3608c5bfb0
commit
13447df1e0
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user