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.cs9
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);
}
}
}