mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-23 01:18:02 +01:00
Remove deprecated, unversioned profile setters
This commit is contained in:
committed by
Jon Chambers
parent
b496ef8d6f
commit
2b2e26f14b
@@ -323,46 +323,6 @@ class ProfileControllerTest {
|
||||
assertThat(profile.getCapabilities().isAnnouncementGroup()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSetProfileNameDeprecated() {
|
||||
Response response = resources.getJerseyTest()
|
||||
.target("/v1/profile/name/123456789012345678901234567890123456789012345678901234567890123456789012")
|
||||
.request()
|
||||
.header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD))
|
||||
.put(Entity.text(""));
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(204);
|
||||
|
||||
verify(accountsManager, times(1)).update(any(Account.class), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSetProfileNameExtendedDeprecated() {
|
||||
Response response = resources.getJerseyTest()
|
||||
.target("/v1/profile/name/123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678")
|
||||
.request()
|
||||
.header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD))
|
||||
.put(Entity.text(""));
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(204);
|
||||
|
||||
verify(accountsManager, times(1)).update(any(Account.class), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSetProfileNameWrongSizeDeprecated() {
|
||||
Response response = resources.getJerseyTest()
|
||||
.target("/v1/profile/name/1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")
|
||||
.request()
|
||||
.header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD))
|
||||
.put(Entity.text(""));
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(400);
|
||||
verifyNoMoreInteractions(accountsManager);
|
||||
}
|
||||
|
||||
/////
|
||||
|
||||
@Test
|
||||
void testSetProfileWantAvatarUpload() throws InvalidInputException {
|
||||
ProfileKeyCommitment commitment = new ProfileKey(new byte[32]).getCommitment(AuthHelper.VALID_UUID);
|
||||
|
||||
Reference in New Issue
Block a user