diff --git a/test/Kook.Net.Tests.Integration.Socket/MessageTests.cs b/test/Kook.Net.Tests.Integration.Socket/MessageTests.cs index 3535279b..0dc2566d 100644 --- a/test/Kook.Net.Tests.Integration.Socket/MessageTests.cs +++ b/test/Kook.Net.Tests.Integration.Socket/MessageTests.cs @@ -217,6 +217,7 @@ await secondMessage.ModifyAsync(x => // Clean up _client.MessageReceived -= ClientOnMessageReceived; + _client.MessageUpdated -= ClientOnMessageUpdated; return; Task ClientOnMessageReceived(SocketMessage message, SocketGuildUser author, SocketTextChannel channel) diff --git a/test/Kook.Net.Tests.Unit/UrlValidationTests.cs b/test/Kook.Net.Tests.Unit/UrlValidationTests.cs index b957a773..1e9259ae 100644 --- a/test/Kook.Net.Tests.Unit/UrlValidationTests.cs +++ b/test/Kook.Net.Tests.Unit/UrlValidationTests.cs @@ -39,6 +39,7 @@ public void UrlValidation_InvalidUrl(string url) => [Theory] [InlineData("http://img.kaiheila.cn/assets/2021-01/7kr4FkWpLV0ku0ku.jpeg")] [InlineData("https://img.kookapp.cn/assets/2021-01/7kr4FkWpLV0ku0ku.jpeg")] + [InlineData("https://img.kookapp.cn/assets/2021-01/7kr4FkWpLV0ku0ku")] [InlineData("http://kaiheila.oss-cn-beijing.aliyuncs.com/assets/2021-01/7kr4FkWpLV0ku0ku.jpeg")] [InlineData("https://img.kookapp.cn/attachments/2022-08/19/GHUrXywopm1hc0u0.png")] public void UrlValidation_ValidAssetUrl(string url) => Assert.True(UrlValidation.ValidateKookAssetUrl(url)); @@ -54,7 +55,6 @@ public void UrlValidation_InvalidUrl(string url) => [InlineData("steam://run/123456/")] [InlineData("https://img.kookapp.cn/attachments/2022-08/19/")] [InlineData("img.kaiheila.cn/assets/2021-01/7kr4FkWpLV0ku0ku.jpeg")] - [InlineData("https://img.kaiheila.cn/assets/2021-01/7kr4FkWpLV0ku0ku")] [InlineData("https://kaiheila.net/guides/getting_started/images/install/install-vs-dependencies.png")] public void UrlValidation_InvalidAssetUrl(string url) => Assert.Throws(() => UrlValidation.ValidateKookAssetUrl(url)); }