mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 10:48:04 +01:00
Convert SubscriptionController request/response entities to records
This commit is contained in:
committed by
Sergey Skrobotov
parent
16012e6ffe
commit
f9fabbedce
@@ -342,9 +342,9 @@ class SubscriptionControllerTest {
|
||||
|
||||
assertThat(response.readEntity(SubscriptionController.SetSubscriptionLevelErrorResponse.class))
|
||||
.satisfies(errorResponse -> {
|
||||
assertThat(errorResponse.getErrors())
|
||||
assertThat(errorResponse.errors())
|
||||
.anySatisfy(error -> {
|
||||
assertThat(error.getType()).isEqualTo(
|
||||
assertThat(error.type()).isEqualTo(
|
||||
SubscriptionController.SetSubscriptionLevelErrorResponse.Error.Type.PAYMENT_REQUIRES_ACTION);
|
||||
});
|
||||
});
|
||||
@@ -559,7 +559,7 @@ class SubscriptionControllerTest {
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
|
||||
assertThat(response.readEntity(SubscriptionController.SetSubscriptionLevelSuccessResponse.class))
|
||||
.extracting(SubscriptionController.SetSubscriptionLevelSuccessResponse::getLevel)
|
||||
.extracting(SubscriptionController.SetSubscriptionLevelSuccessResponse::level)
|
||||
.isEqualTo(level);
|
||||
}
|
||||
|
||||
@@ -628,7 +628,7 @@ class SubscriptionControllerTest {
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
|
||||
assertThat(response.readEntity(SubscriptionController.SetSubscriptionLevelSuccessResponse.class))
|
||||
.extracting(SubscriptionController.SetSubscriptionLevelSuccessResponse::getLevel)
|
||||
.extracting(SubscriptionController.SetSubscriptionLevelSuccessResponse::level)
|
||||
.isEqualTo(requestLevel);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user