mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 21:08:03 +01:00
Add a (failing) test for new Ivory Coast phone numbers.
This commit is contained in:
committed by
Jon Chambers
parent
b2e9602aba
commit
1a27c7eabc
@@ -244,6 +244,25 @@ public class AccountControllerTest {
|
||||
verifyNoMoreInteractions(apnSender);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetFcmPreauthIvoryCoast() throws Exception {
|
||||
Response response = resources.getJerseyTest()
|
||||
.target("/v1/accounts/fcm/preauth/mytoken/+2250707312345")
|
||||
.request()
|
||||
.get();
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
|
||||
ArgumentCaptor<GcmMessage> captor = ArgumentCaptor.forClass(GcmMessage.class);
|
||||
|
||||
verify(gcmSender, times(1)).sendMessage(captor.capture());
|
||||
assertThat(captor.getValue().getGcmId()).isEqualTo("mytoken");
|
||||
assertThat(captor.getValue().getData().isPresent()).isTrue();
|
||||
assertThat(captor.getValue().getData().get().length()).isEqualTo(32);
|
||||
|
||||
verifyNoMoreInteractions(apnSender);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetApnPreauth() throws Exception {
|
||||
Response response = resources.getJerseyTest()
|
||||
|
||||
Reference in New Issue
Block a user