Validate level in OneTimeDonationController

This commit is contained in:
Chris Eager authored and Chris Eager committed 2026-04-13 17:12:35 -05:00
1 parent ea1e4f02d0
commit 09c18205d4
2 files changed
+15 -8

No files matched your search

@@ -104,8 +104,7 @@ class OneTimeDonationControllerTest extends AbstractV1SubscriptionControllerTest
.post(Entity.json("""
{
"currency": "USD",
"amount": 249,
"level": null
"amount": 249
}
"""));
assertThat(response.getStatus()).isEqualTo(400);
@@ -125,7 +124,6 @@ class OneTimeDonationControllerTest extends AbstractV1SubscriptionControllerTest
{
"currency": "EUR",
"amount": 1000001,
"level": null,
"paymentMethod": "SEPA_DEBIT"
}
"""));
@@ -147,7 +145,6 @@ class OneTimeDonationControllerTest extends AbstractV1SubscriptionControllerTest
{
"currency": "USD",
"amount": 3000,
"level": null,
"paymentMethod": "SEPA_DEBIT"
}
"""));
@@ -170,7 +167,10 @@ class OneTimeDonationControllerTest extends AbstractV1SubscriptionControllerTest
final Response response = RESOURCE_EXTENSION.target("/v1/subscription/boost/create")
.request()
.post(Entity.json("{\"currency\": \"USD\", \"amount\": 300, \"level\": null}"));
.post(Entity.json("""
{"currency": "USD", "amount": 300}
"""
));
assertThat(response.getStatus()).isEqualTo(200);
}