From 0c34fbd0cdd6510f11fb1b78f71e1aff9d2dfa84 Mon Sep 17 00:00:00 2001 From: Victor Usoltsev Date: Thu, 8 Oct 2020 12:13:42 +1300 Subject: [PATCH] Adds a test for ToHttpsUrl extension. --- src/Ombi.Helpers.Tests/StringHelperTests.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Ombi.Helpers.Tests/StringHelperTests.cs b/src/Ombi.Helpers.Tests/StringHelperTests.cs index d03f926ff..80ca32c64 100644 --- a/src/Ombi.Helpers.Tests/StringHelperTests.cs +++ b/src/Ombi.Helpers.Tests/StringHelperTests.cs @@ -40,5 +40,14 @@ namespace Ombi.Helpers.Tests Assert.AreEqual(expectedUrl, sourceUrl.ToHttpsUrl(), "Should return the unchanged invalid URL"); } + + [Test] + public void ToHttpsUrl_ShouldReturnNull_NullUrl() + { + const string sourceUrl = null; + const string expectedUrl = null; + + Assert.AreEqual(expectedUrl, sourceUrl.ToHttpsUrl(), "Should return null for null URL"); + } } } \ No newline at end of file