mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-29 14:05:18 -04:00
Fix tests
This commit is contained in:
parent
dccd9a2f08
commit
982ba6a76c
1 changed files with 40 additions and 6 deletions
|
@ -178,15 +178,49 @@ public class HtmlEmbedSpecs
|
||||||
);
|
);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
message
|
var imageUrls = message
|
||||||
.QuerySelectorAll("img")
|
.QuerySelectorAll("img")
|
||||||
.Select(e => e.GetAttribute("src"))
|
.Select(e => e.GetAttribute("src"))
|
||||||
|
.ToArray();
|
||||||
|
|
||||||
|
imageUrls
|
||||||
.Should()
|
.Should()
|
||||||
.ContainInOrder(
|
.Contain(
|
||||||
"https://images-ext-1.discordapp.net/external/-n--xW3EHH_3jlrheVkMXHCM7T86b5Ty4-MzXCT4m1Q/https/pbs.twimg.com/media/FVYIzYPWAAAMBqZ.png",
|
u =>
|
||||||
"https://images-ext-2.discordapp.net/external/z5nEmGeEldV-kswydGLhqUsFHbb5AWHtdvc9XT6N5rE/https/pbs.twimg.com/media/FVYJBWJWAAMNAx2.png",
|
u.EndsWith(
|
||||||
"https://images-ext-2.discordapp.net/external/gnip03SawMB6uZLagN5sRDpA_1Ap1CcEhMbJfK1z6WQ/https/pbs.twimg.com/media/FVYJHiRX0AANZcz.png",
|
"https/pbs.twimg.com/media/FVYIzYPWAAAMBqZ.png",
|
||||||
"https://images-ext-2.discordapp.net/external/jl1v6cCbLaGmiwmKU-ZkXnF4cFsJ39f9A3-oEdqPdZs/https/pbs.twimg.com/media/FVYJNZNXwAAPnVG.png"
|
StringComparison.Ordinal
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
imageUrls
|
||||||
|
.Should()
|
||||||
|
.Contain(
|
||||||
|
u =>
|
||||||
|
u.EndsWith(
|
||||||
|
"https/pbs.twimg.com/media/FVYJBWJWAAMNAx2.png",
|
||||||
|
StringComparison.Ordinal
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
imageUrls
|
||||||
|
.Should()
|
||||||
|
.Contain(
|
||||||
|
u =>
|
||||||
|
u.EndsWith(
|
||||||
|
"https/pbs.twimg.com/media/FVYJHiRX0AANZcz.png",
|
||||||
|
StringComparison.Ordinal
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
imageUrls
|
||||||
|
.Should()
|
||||||
|
.Contain(
|
||||||
|
u =>
|
||||||
|
u.EndsWith(
|
||||||
|
"https/pbs.twimg.com/media/FVYJNZNXwAAPnVG.png",
|
||||||
|
StringComparison.Ordinal
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
message.QuerySelectorAll(".chatlog__embed").Should().ContainSingle();
|
message.QuerySelectorAll(".chatlog__embed").Should().ContainSingle();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue