From fd544c929c000c4eacbe0ac2d273c82e51a40e77 Mon Sep 17 00:00:00 2001 From: Kevin Joy Date: Fri, 6 Dec 2024 14:40:19 +0000 Subject: [PATCH] . --- .../Pages/RequestTrn/Index.cshtml.cs | 2 +- .../PageTests/RequestTrn/IndexTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.AuthorizeAccess/Pages/RequestTrn/Index.cshtml.cs b/TeachingRecordSystem/src/TeachingRecordSystem.AuthorizeAccess/Pages/RequestTrn/Index.cshtml.cs index 24c5aeb88..f3a09a1b5 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.AuthorizeAccess/Pages/RequestTrn/Index.cshtml.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.AuthorizeAccess/Pages/RequestTrn/Index.cshtml.cs @@ -17,7 +17,7 @@ public ActionResult OnGet() var whitelistedAccessToken = configuration.GetRequiredValue("RequestTrnAccessToken"); if (!whitelistedAccessToken.Equals(AccessToken, StringComparison.Ordinal)) { - return BadRequest(); + return NotFound(); } return Page(); } diff --git a/TeachingRecordSystem/tests/TeachingRecordSystem.AuthorizeAccess.Tests/PageTests/RequestTrn/IndexTests.cs b/TeachingRecordSystem/tests/TeachingRecordSystem.AuthorizeAccess.Tests/PageTests/RequestTrn/IndexTests.cs index 860e274db..edc67fe1b 100644 --- a/TeachingRecordSystem/tests/TeachingRecordSystem.AuthorizeAccess.Tests/PageTests/RequestTrn/IndexTests.cs +++ b/TeachingRecordSystem/tests/TeachingRecordSystem.AuthorizeAccess.Tests/PageTests/RequestTrn/IndexTests.cs @@ -32,6 +32,6 @@ public async Task Get_MissingAccessToken_ReturnsBadRequest() var response = await HttpClient.SendAsync(request); // Assert - Assert.Equal(StatusCodes.Status400BadRequest, (int)response.StatusCode); + Assert.Equal(StatusCodes.Status404NotFound, (int)response.StatusCode); } }