diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-02-22 16:27:02 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-02-22 16:27:02 +0100 |
| commit | baadc48f43ec425659d0d7210f1a97416d7d34c5 (patch) | |
| tree | 028df1e3cf1feddd5b4040071d1d3c4425d976ce /tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs | |
| parent | ec3237ba55a6c0c6e7a31e2aaa5fbf77c9978ac7 (diff) | |
Address comments
Diffstat (limited to 'tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs')
| -rw-r--r-- | tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs b/tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs index 3207a0f25..40933562d 100644 --- a/tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs +++ b/tests/Jellyfin.Api.Tests/Controllers/BrandingControllerTests.cs @@ -1,3 +1,5 @@ +using System.Net.Mime; +using System.Text; using System.Text.Json; using System.Threading.Tasks; using MediaBrowser.Model.Branding; @@ -25,8 +27,8 @@ namespace Jellyfin.Api.Tests // Assert Assert.True(response.IsSuccessStatusCode); - Assert.Equal("application/json", response.Content.Headers.ContentType?.MediaType); - Assert.Equal("utf-8", response.Content.Headers.ContentType?.CharSet); + 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); } @@ -44,7 +46,8 @@ namespace Jellyfin.Api.Tests // Assert Assert.True(response.IsSuccessStatusCode); - Assert.Equal("text/css; charset=utf-8", response.Content.Headers.ContentType?.ToString()); + Assert.Equal("text/css", response.Content.Headers.ContentType?.MediaType); + Assert.Equal(Encoding.UTF8.BodyName, response.Content.Headers.ContentType?.CharSet); } } } |
