Make test assertions more relaxed in terms of user-made content URLs

This commit is contained in:
Tyrrrz
2023-12-26 02:40:50 +02:00
parent 5f343a46d1
commit 062427d143
2 changed files with 9 additions and 19 deletions

View File

@@ -27,13 +27,7 @@ public class HtmlAttachmentSpecs
.QuerySelectorAll("a")
.Select(e => e.GetAttribute("href"))
.Should()
.Contain(
u =>
u.StartsWith(
"https://cdn.discordapp.com/attachments/885587741654536192/885587844964417596/Test.txt",
StringComparison.Ordinal
)
);
.Contain(u => u.Contains("Test.txt", StringComparison.Ordinal));
}
[Fact]
@@ -52,13 +46,7 @@ public class HtmlAttachmentSpecs
.QuerySelectorAll("img")
.Select(e => e.GetAttribute("src"))
.Should()
.Contain(
u =>
u.StartsWith(
"https://cdn.discordapp.com/attachments/885587741654536192/885654862430359613/bird-thumbnail.png",
StringComparison.Ordinal
)
);
.Contain(u => u.Contains("bird-thumbnail.png", StringComparison.Ordinal));
}
[Fact]