aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs')
-rw-r--r--tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs53
1 files changed, 0 insertions, 53 deletions
diff --git a/tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs b/tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs
deleted file mode 100644
index 40933562d..000000000
--- a/tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using System.Net.Mime;
-using System.Text;
-using System.Text.Json;
-using System.Threading.Tasks;
-using MediaBrowser.Model.Branding;
-using Xunit;
-
-namespace Jellyfin.Api.Tests
-{
- public sealed class BrandingControllerTests : IClassFixture<JellyfinApplicationFactory>
- {
- private readonly JellyfinApplicationFactory _factory;
-
- public BrandingControllerTests(JellyfinApplicationFactory factory)
- {
- _factory = factory;
- }
-
- [Fact]
- public async Task GetConfiguration_ReturnsCorrectResponse()
- {
- // Arrange
- var client = _factory.CreateClient();
-
- // Act
- var response = await client.GetAsync("/Branding/Configuration");
-
- // Assert
- Assert.True(response.IsSuccessStatusCode);
- Assert.Equal(MediaTypeNames.Application.Json, response.Content.Headers.ContentType?.MediaType);
- Assert.Equal(Encoding.UTF8.BodyName, response.Content.Headers.ContentType?.CharSet);
- var responseBody = await response.Content.ReadAsStreamAsync();
- _ = await JsonSerializer.DeserializeAsync<BrandingOptions>(responseBody);
- }
-
- [Theory]
- [InlineData("/Branding/Css")]
- [InlineData("/Branding/Css.css")]
- public async Task GetCss_ReturnsCorrectResponse(string url)
- {
- // Arrange
- var client = _factory.CreateClient();
-
- // Act
- var response = await client.GetAsync(url);
-
- // Assert
- Assert.True(response.IsSuccessStatusCode);
- Assert.Equal("text/css", response.Content.Headers.ContentType?.MediaType);
- Assert.Equal(Encoding.UTF8.BodyName, response.Content.Headers.ContentType?.CharSet);
- }
- }
-}