You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
756 B
29 lines
756 B
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);
|
|
}
|
|
}
|