diff --git a/Razor Blades Tests/HtmlTagsTests/IconTests/IconSets.cs b/Razor Blades Tests/HtmlTagsTests/IconTests/IconSets.cs index 6e53af9..0a8726b 100644 --- a/Razor Blades Tests/HtmlTagsTests/IconTests/IconSets.cs +++ b/Razor Blades Tests/HtmlTagsTests/IconTests/IconSets.cs @@ -16,6 +16,25 @@ public void DefaultSet() var path = "/path/icon.png"; var set = Connect.Razor.Internals.HtmlPage.IconSet.GenerateIconSet(path); Assert.AreEqual(4, set.Count, "expected 3 items in set"); + Is($"", + set[0]); + Is($"", + set[1]); + Is($"", + set[2]); + Is( + $"", + set[3]); + } + + [TestMethod] + public void WithoutDefaultFav() + { + var path = "/path/icon.png"; + + var set = Connect.Razor.Internals.HtmlPage.IconSet.GenerateIconSet(path, true); + Assert.AreEqual(4, set.Count, "expected 3 items in set"); + Is($"", set[0]); Is($"", @@ -27,6 +46,7 @@ public void DefaultSet() set[3]); } + [TestMethod] public void WithoutFav() { diff --git a/Razor.Blade/Internals/HtmlPage/IconSet.cs b/Razor.Blade/Internals/HtmlPage/IconSet.cs index ffaca32..60df801 100644 --- a/Razor.Blade/Internals/HtmlPage/IconSet.cs +++ b/Razor.Blade/Internals/HtmlPage/IconSet.cs @@ -29,6 +29,8 @@ internal static List GenerateIconSet(string path, object favicon = null, I switch (favicon) { case null: + result.Add(new Icon(path, Icon.RelShortcut)); + break; case bool favBool when favBool: result.Add(new Icon(Icon.RootFavicon, Icon.RelShortcut)); break;