Avoid annotation-driven parsing of device capabilities in DeviceController

This commit is contained in:
Jonathan Klabunde Tomer
2024-10-30 16:52:40 -07:00
committed by Jon Chambers
parent bf741df38e
commit 63021e0ca3
4 changed files with 24 additions and 25 deletions

View File

@@ -785,10 +785,11 @@ class DeviceControllerTest {
.request()
.header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD))
.header(HttpHeaders.USER_AGENT, "Signal-Android/5.42.8675309 Android/30")
.put(Entity.entity(Set.of(), MediaType.APPLICATION_JSON_TYPE))) {
.put(Entity.json("{\"deleteSync\": true, \"notARealDeviceCapability\": true}"))) {
assertThat(response.getStatus()).isEqualTo(204);
assertThat(response.hasEntity()).isFalse();
verify(AuthHelper.VALID_DEVICE).setCapabilities(Set.of(DeviceCapability.DELETE_SYNC));
}
}