feat: setup initial create payment endpoint

This commit is contained in:
Stevan Freeborn
2025-12-26 08:00:04 -06:00
parent 161e857702
commit fe3928bbc7
8 changed files with 117 additions and 11 deletions
@@ -0,0 +1,25 @@
using System.Net;
using System.Net.Http.Json;
using GroundsForSupport.API.Tests.Integration.Infra;
namespace GroundsForSupport.API.Tests.Integration;
public sealed class PaymentTests(TestApi api) : IClassFixture<TestApi>
{
private readonly TestApi _api = api;
[Fact]
public async Task CreatePaymentIntent_WhenGivenInvalidAmount_ItShouldReturnBadRequest()
{
var client = _api.CreateClient();
var request = new {
amount = 0,
email = string.Empty,
};
var response = await client.PostAsJsonAsync("/create-payment-intent", request, TestContext.Current.CancellationToken);
response.StatusCode.Should().Be(HttpStatusCode.BadRequest);
}
}