aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2022-03-18 16:52:59 -0600
committerGitHub <noreply@github.com>2022-03-18 16:52:59 -0600
commit6a567e8c76a37331f193359cdc090627ab02e244 (patch)
treee230fdcf8fffd089ef6bc919649abc27e14b9b1c /tests
parent4b5148c69ec05a265e21af2eae09c43479e1d80c (diff)
parent8a827ba995f2998b138d6df07dadbeceec83ea94 (diff)
Merge pull request #7474 from nielsvanvelzen/api-secure
Diffstat (limited to 'tests')
-rw-r--r--tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs
index 3396a94e5..0afb6f88d 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs
@@ -14,6 +14,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
{
private readonly JellyfinApplicationFactory _factory;
private readonly JsonSerializerOptions _jsonOpions = JsonDefaults.Options;
+ private static string? _accessToken;
public DashboardControllerTests(JellyfinApplicationFactory factory)
{
@@ -57,6 +58,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
public async Task GetConfigurationPages_NoParams_AllConfigurationPages()
{
var client = _factory.CreateClient();
+ client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client).ConfigureAwait(false));
var response = await client.GetAsync("/web/ConfigurationPages").ConfigureAwait(false);
@@ -71,6 +73,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
public async Task GetConfigurationPages_True_MainMenuConfigurationPages()
{
var client = _factory.CreateClient();
+ client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client).ConfigureAwait(false));
var response = await client.GetAsync("/web/ConfigurationPages?enableInMainMenu=true").ConfigureAwait(false);