diff options
| author | Cody Robibero <cody@robibe.ro> | 2022-03-11 18:42:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-11 18:42:14 -0700 |
| commit | 5319f1571fb354151fb257e7780aeec7d088e8cf (patch) | |
| tree | 19ef76c258b67b3f93651d5a576353ccdd65f5e2 | |
| parent | 6e80c9b25f13dbed53f57d524649b54aff286950 (diff) | |
| parent | edeb1983139c2668450d819273f229026a48f0b5 (diff) | |
Merge pull request #7444 from Bond-009/baseurl
| -rw-r--r-- | tests/Jellyfin.Networking.Tests/Configuration/NetworkConfigurationTests.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/Jellyfin.Networking.Tests/Configuration/NetworkConfigurationTests.cs b/tests/Jellyfin.Networking.Tests/Configuration/NetworkConfigurationTests.cs new file mode 100644 index 000000000..a78b872df --- /dev/null +++ b/tests/Jellyfin.Networking.Tests/Configuration/NetworkConfigurationTests.cs @@ -0,0 +1,28 @@ +using Jellyfin.Networking.Configuration; +using Xunit; + +namespace Jellyfin.Networking.Tests.Configuration; + +public static class NetworkConfigurationTests +{ + [Theory] + [InlineData("", null)] + [InlineData("", "")] + [InlineData("/Test", "/Test")] + [InlineData("/Test", "Test")] + [InlineData("/Test", "Test/")] + [InlineData("/Test", "/Test/")] + [InlineData("/Test/2", "/Test/2")] + [InlineData("/Test/2", "Test/2")] + [InlineData("/Test/2", "Test/2/")] + [InlineData("/Test/2", "/Test/2/")] + public static void BaseUrl_ReturnsNormalized(string expected, string input) + { + var config = new NetworkConfiguration() + { + BaseUrl = input + }; + + Assert.Equal(expected, config.BaseUrl); + } +} |
