diff --git a/backend/tests/Designer.Tests/Controllers/ApiTests/ApiTestsAuthAndCookieDelegatingHandler.cs b/backend/tests/Designer.Tests/Controllers/ApiTests/ApiTestsAuthAndCookieDelegatingHandler.cs index e51a0baf825..67090b528f0 100644 --- a/backend/tests/Designer.Tests/Controllers/ApiTests/ApiTestsAuthAndCookieDelegatingHandler.cs +++ b/backend/tests/Designer.Tests/Controllers/ApiTests/ApiTestsAuthAndCookieDelegatingHandler.cs @@ -36,6 +36,7 @@ protected override async Task SendAsync(HttpRequestMessage using var httpRequestMessageXsrf = new HttpRequestMessage(HttpMethod.Get, xsrfUrl); using var xsrfResponse = await base.SendAsync(httpRequestMessageXsrf, cancellationToken); + xsrfResponse.EnsureSuccessStatusCode(); string xsrfToken = AuthenticationUtil.GetXsrfTokenFromCookie(xsrfResponse.Headers.GetValues(Microsoft.Net.Http.Headers.HeaderNames.SetCookie)); request.AddXsrfToken(xsrfToken); diff --git a/backend/tests/Designer.Tests/Controllers/ApiTests/DbDesignerEndpointsTestsBase.cs b/backend/tests/Designer.Tests/Controllers/ApiTests/DbDesignerEndpointsTestsBase.cs index 6f52863246c..b71370f800d 100644 --- a/backend/tests/Designer.Tests/Controllers/ApiTests/DbDesignerEndpointsTestsBase.cs +++ b/backend/tests/Designer.Tests/Controllers/ApiTests/DbDesignerEndpointsTestsBase.cs @@ -1,5 +1,4 @@ -using System; -using Designer.Tests.Fixtures; +using Designer.Tests.Fixtures; using Microsoft.AspNetCore.Mvc.Testing; using Xunit;