aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Implementations.Tests/HttpServer
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-06-13 15:09:02 -0600
committercrobibero <cody@robibe.ro>2020-06-13 15:09:02 -0600
commit6c7cc92a092eb9de044aad26b5e989aea0012869 (patch)
treed80c5c0b4395a9d2cafd92f8741cc6d3d9d651f9 /tests/Jellyfin.Server.Implementations.Tests/HttpServer
parentfb068b76a12bf9de5de75a0b8079effcd0336ecf (diff)
parent0011e8df47380936742302ef40639a4626a780ed (diff)
Merge remote-tracking branch 'upstream/api-migration' into api-image2
Diffstat (limited to 'tests/Jellyfin.Server.Implementations.Tests/HttpServer')
-rw-r--r--tests/Jellyfin.Server.Implementations.Tests/HttpServer/ResponseFilterTests.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/HttpServer/ResponseFilterTests.cs b/tests/Jellyfin.Server.Implementations.Tests/HttpServer/ResponseFilterTests.cs
new file mode 100644
index 000000000..39bd94b59
--- /dev/null
+++ b/tests/Jellyfin.Server.Implementations.Tests/HttpServer/ResponseFilterTests.cs
@@ -0,0 +1,18 @@
+using Emby.Server.Implementations.HttpServer;
+using Xunit;
+
+namespace Jellyfin.Server.Implementations.Tests.HttpServer
+{
+ public class ResponseFilterTests
+ {
+ [Theory]
+ [InlineData(null, null)]
+ [InlineData("", "")]
+ [InlineData("This is a clean string.", "This is a clean string.")]
+ [InlineData("This isn't \n\ra clean string.", "This isn't a clean string.")]
+ public void RemoveControlCharacters_ValidArgs_Correct(string? input, string? result)
+ {
+ Assert.Equal(result, ResponseFilter.RemoveControlCharacters(input));
+ }
+ }
+}