aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Networking.Tests/NetworkParseTests.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2021-03-22 17:04:09 +0000
committerBaronGreenback <jimcartlidge@yahoo.co.uk>2021-03-22 17:04:09 +0000
commit7fa525c83b7573e61124fa1c64a3b27569e66b6d (patch)
tree1f30da5a8aa3d4213e9d2ab8fbe8f9dcc7dffe1a /tests/Jellyfin.Networking.Tests/NetworkParseTests.cs
parent4cf88f67baf8f76ce4ed630cc73ef73405c0212b (diff)
Added more tests
Diffstat (limited to 'tests/Jellyfin.Networking.Tests/NetworkParseTests.cs')
-rw-r--r--tests/Jellyfin.Networking.Tests/NetworkParseTests.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/Jellyfin.Networking.Tests/NetworkParseTests.cs b/tests/Jellyfin.Networking.Tests/NetworkParseTests.cs
index 19f0faa8f..de81ad0a6 100644
--- a/tests/Jellyfin.Networking.Tests/NetworkParseTests.cs
+++ b/tests/Jellyfin.Networking.Tests/NetworkParseTests.cs
@@ -518,7 +518,9 @@ namespace Jellyfin.Networking.Tests
[Theory]
[InlineData("185.10.10.10,200.200.200.200", "79.2.3.4", true)]
[InlineData("185.10.10.10", "185.10.10.10", false)]
- public void HasRemoteAccess_GivenNonEmptyWhitelist_AllowsOnlyIpsInWhitelist(string addresses, string remoteIp, bool denied)
+ [InlineData("", "100.100.100.100", false)]
+
+ public void HasRemoteAccess_GivenWhitelist_AllowsOnlyIpsInWhitelist(string addresses, string remoteIp, bool denied)
{
// Comma separated list of IP addresses or IP/netmask entries for networks that will be allowed to connect remotely.
// If left blank, all remote addresses will be allowed.
@@ -534,9 +536,10 @@ namespace Jellyfin.Networking.Tests
}
[Theory]
- [InlineData("185.10.10.10", "79.2.3.4", false)] // blacklist
- [InlineData("185.10.10.10", "185.10.10.10", true)] // blacklist
- public void HasRemoteAccess_GivenNonEmptyBlacklist_BlacklistTheIps(string addresses, string remoteIp, bool denied)
+ [InlineData("185.10.10.10", "79.2.3.4", false)]
+ [InlineData("185.10.10.10", "185.10.10.10", true)]
+ [InlineData("", "100.100.100.100", false)]
+ public void HasRemoteAccess_GivenBlacklist_BlacklistTheIps(string addresses, string remoteIp, bool denied)
{
// Comma separated list of IP addresses or IP/netmask entries for networks that will be allowed to connect remotely.
// If left blank, all remote addresses will be allowed.