public async Task Get_ForIdentityAccountRegisterAndAuthenticatedUser_RedirectsToLoginPage() { // Arrange await using var webApplicationFactory = new CustomWebApplicationFactory(ApplicationUser.PrivilegedUser); using var client = webApplicationFactory.CreateDefaultHttpClient(); // Act using var response = await client.GetAsync(new Uri ("https://localhost:5001/Identity/Account/Register"), CancellationToken.None); // Assert ResponseAssert.VerifyMovedPermanently(response, new Uri("/Identity/Account/Login", UriKind.Relative)); }