mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Add tests for BaseUrl normalization
This commit is contained in:
parent
53209830e7
commit
edeb198313
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user