Simplify parsing/validation of spam report tokens

This commit is contained in:
Jon Chambers
2023-01-30 11:15:22 -05:00
committed by Jon Chambers
parent 48e8584e13
commit 00e08b8402
3 changed files with 9 additions and 15 deletions

View File

@@ -722,8 +722,7 @@ class MessageControllerTest {
ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class);
String token = Base64.getEncoder().encodeToString(new byte[3]);
Entity<SpamReport> entity = Entity.entity(new SpamReport(token), "application/json");
Entity<SpamReport> entity = Entity.entity(new SpamReport(new byte[3]), "application/json");
Response response =
resources.getJerseyTest()
.target(String.format("/v1/messages/report/%s/%s", senderAci, messageGuid))
@@ -744,8 +743,7 @@ class MessageControllerTest {
messageGuid = UUID.randomUUID();
token = Base64.getEncoder().encodeToString(new byte[5]);
entity = Entity.entity(new SpamReport(token), "application/json");
entity = Entity.entity(new SpamReport(new byte[5]), "application/json");
response =
resources.getJerseyTest()
.target(String.format("/v1/messages/report/%s/%s", senderAci, messageGuid))