Make tests more resilient

This commit is contained in:
Tyrrrz
2023-09-28 19:18:52 +03:00
parent c466c17793
commit fbfff4e51f
5 changed files with 32 additions and 15 deletions

View File

@@ -19,7 +19,7 @@ public class HtmlStickerSpecs
// Assert
var stickerUrl = message.QuerySelector("[title='rock'] img")?.GetAttribute("src");
stickerUrl.Should().Be("https://cdn.discordapp.com/stickers/904215665597120572.png");
stickerUrl.Should().StartWith("https://cdn.discordapp.com/stickers/904215665597120572.png");
}
[Fact]
@@ -35,6 +35,9 @@ public class HtmlStickerSpecs
var stickerUrl = message
.QuerySelector("[title='Yikes'] [data-source]")
?.GetAttribute("data-source");
stickerUrl.Should().Be("https://cdn.discordapp.com/stickers/816087132447178774.json");
stickerUrl
.Should()
.StartWith("https://cdn.discordapp.com/stickers/816087132447178774.json");
}
}