|
@@ -8,7 +8,7 @@ using Jellyfin.Api.Models;
|
|
using MediaBrowser.Common.Json;
|
|
using MediaBrowser.Common.Json;
|
|
using Xunit;
|
|
using Xunit;
|
|
|
|
|
|
-namespace Jellyfin.Api.Tests.Controllers
|
|
|
|
|
|
+namespace Jellyfin.Server.Integration.Tests.Controllers
|
|
{
|
|
{
|
|
public sealed class DashboardControllerTests : IClassFixture<JellyfinApplicationFactory>
|
|
public sealed class DashboardControllerTests : IClassFixture<JellyfinApplicationFactory>
|
|
{
|
|
{
|
|
@@ -37,9 +37,9 @@ namespace Jellyfin.Api.Tests.Controllers
|
|
|
|
|
|
var response = await client.GetAsync("/web/ConfigurationPage?name=TestPlugin").ConfigureAwait(false);
|
|
var response = await client.GetAsync("/web/ConfigurationPage?name=TestPlugin").ConfigureAwait(false);
|
|
|
|
|
|
- Assert.True(response.IsSuccessStatusCode);
|
|
|
|
|
|
+ Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
|
Assert.Equal(MediaTypeNames.Text.Html, response.Content.Headers.ContentType?.MediaType);
|
|
Assert.Equal(MediaTypeNames.Text.Html, response.Content.Headers.ContentType?.MediaType);
|
|
- StreamReader reader = new StreamReader(typeof(TestPlugin).Assembly.GetManifestResourceStream("Jellyfin.Api.Tests.TestPage.html")!);
|
|
|
|
|
|
+ StreamReader reader = new StreamReader(typeof(TestPlugin).Assembly.GetManifestResourceStream("Jellyfin.Server.Integration.Tests.TestPage.html")!);
|
|
Assert.Equal(await response.Content.ReadAsStringAsync(), reader.ReadToEnd());
|
|
Assert.Equal(await response.Content.ReadAsStringAsync(), reader.ReadToEnd());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -60,7 +60,7 @@ namespace Jellyfin.Api.Tests.Controllers
|
|
|
|
|
|
var response = await client.GetAsync("/web/ConfigurationPages").ConfigureAwait(false);
|
|
var response = await client.GetAsync("/web/ConfigurationPages").ConfigureAwait(false);
|
|
|
|
|
|
- Assert.True(response.IsSuccessStatusCode);
|
|
|
|
|
|
+ Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
|
|
|
|
|
var res = await response.Content.ReadAsStreamAsync();
|
|
var res = await response.Content.ReadAsStreamAsync();
|
|
_ = await JsonSerializer.DeserializeAsync<ConfigurationPageInfo[]>(res, _jsonOpions);
|
|
_ = await JsonSerializer.DeserializeAsync<ConfigurationPageInfo[]>(res, _jsonOpions);
|
|
@@ -74,7 +74,7 @@ namespace Jellyfin.Api.Tests.Controllers
|
|
|
|
|
|
var response = await client.GetAsync("/web/ConfigurationPages?enableInMainMenu=true").ConfigureAwait(false);
|
|
var response = await client.GetAsync("/web/ConfigurationPages?enableInMainMenu=true").ConfigureAwait(false);
|
|
|
|
|
|
- Assert.True(response.IsSuccessStatusCode);
|
|
|
|
|
|
+ Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
|
Assert.Equal(MediaTypeNames.Application.Json, response.Content.Headers.ContentType?.MediaType);
|
|
Assert.Equal(MediaTypeNames.Application.Json, response.Content.Headers.ContentType?.MediaType);
|
|
Assert.Equal(Encoding.UTF8.BodyName, response.Content.Headers.ContentType?.CharSet);
|
|
Assert.Equal(Encoding.UTF8.BodyName, response.Content.Headers.ContentType?.CharSet);
|
|
|
|
|