From 47692fc94633e0124a952a2690c2b0754c0887aa Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Tue, 3 Feb 2026 11:49:02 -0600 Subject: [PATCH] tests: add test for calling refresh with no access token --- .../Integration/RefreshTests.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/FiscalOS.API.Tests/Integration/RefreshTests.cs diff --git a/tests/FiscalOS.API.Tests/Integration/RefreshTests.cs b/tests/FiscalOS.API.Tests/Integration/RefreshTests.cs new file mode 100644 index 0000000..f6dd076 --- /dev/null +++ b/tests/FiscalOS.API.Tests/Integration/RefreshTests.cs @@ -0,0 +1,15 @@ + +namespace FiscalOS.API.Tests.Integration; + +public class RefreshTests(TestApi testApi) : IntegrationTest(testApi) +{ + private static readonly Uri RefreshUri = new("/refresh", UriKind.Relative); + + [Fact] + public async Task Refresh_WhenCalledWithNoAccessToken_ItShouldReturn401Unauthorized() + { + var response = await Client.PostAsync(RefreshUri, null, TestContext.Current.CancellationToken); ; + + response.StatusCode.Should().Be(HttpStatusCode.Unauthorized); + } +} \ No newline at end of file