diff --git a/test/Altinn.App.Api.Tests/Controllers/LookupOrganisationControllerTests.cs b/test/Altinn.App.Api.Tests/Controllers/LookupOrganisationControllerTests.cs index bcad6c630..7a7d6b095 100644 --- a/test/Altinn.App.Api.Tests/Controllers/LookupOrganisationControllerTests.cs +++ b/test/Altinn.App.Api.Tests/Controllers/LookupOrganisationControllerTests.cs @@ -160,7 +160,7 @@ public async Task Post_LookupOrganisation_General_Exception_Returned_Correctly() private HttpClient GetHttpClient() { HttpClient client = GetRootedClient(Org, App); - string token = PrincipalUtil.GetToken(1337, null); + string token = TestAuthentication.GetUserToken(1337); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); return client; } diff --git a/test/Altinn.App.Api.Tests/Controllers/LookupPersonControllerTests.cs b/test/Altinn.App.Api.Tests/Controllers/LookupPersonControllerTests.cs index 8560b896f..7e682efb0 100644 --- a/test/Altinn.App.Api.Tests/Controllers/LookupPersonControllerTests.cs +++ b/test/Altinn.App.Api.Tests/Controllers/LookupPersonControllerTests.cs @@ -281,7 +281,7 @@ public async Task Post_PersonSearch_General_Exception_Returned_Correctly() private HttpClient GetHttpClient() { HttpClient client = GetRootedClient(Org, App); - string token = PrincipalUtil.GetToken(1337, null); + string token = TestAuthentication.GetUserToken(1337); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); return client; }