mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
add changelog links test
This commit is contained in:
parent
e0c54e3207
commit
7fcb01bdf1
@ -509,5 +509,17 @@ namespace osu.Game.Tests.Chat
|
|||||||
Assert.AreEqual(LinkAction.External, result.Action);
|
Assert.AreEqual(LinkAction.External, result.Action);
|
||||||
Assert.AreEqual("/relative", result.Argument);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user