1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

add changelog links test

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-10-12 09:37:42 +07:00
parent e0c54e3207
commit 7fcb01bdf1
No known key found for this signature in database
GPG Key ID: D0E776795342971E

View File

@ -509,5 +509,17 @@ namespace osu.Game.Tests.Chat
Assert.AreEqual(LinkAction.External, result.Action);
Assert.AreEqual("/relative", result.Argument);
}
[TestCase("https://dev.ppy.sh/home/changelog", "")]
[TestCase("https://dev.ppy.sh/home/changelog/lazer/2021.1012", "lazer/2021.1012")]
public void TestChangelogLinks(string link, string expectedArg)
{
MessageFormatter.WebsiteRootUrl = "dev.ppy.sh";
LinkDetails result = MessageFormatter.GetLinkDetails(link);
Assert.AreEqual(LinkAction.OpenChangelog, result.Action);
Assert.AreEqual(expectedArg, result.Argument);
}
}
}