From 8cd5659b7b28d04939fcb879bb12ccd78676fce7 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 25 May 2025 18:28:45 +0600 Subject: [PATCH] updates in Username --- .../kotlin/dev/inmo/tgbotapi/types/ChatIdentifierTests.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/ChatIdentifierTests.kt b/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/ChatIdentifierTests.kt index 4ee9e13a07..5473bb23d0 100644 --- a/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/ChatIdentifierTests.kt +++ b/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/ChatIdentifierTests.kt @@ -35,9 +35,7 @@ class ChatIdentifierTests { fun `Cast_from_String_to_Username_is_working_correctly`() { assertEquals(testUsername, testUsername.toUsername().full) - assertFails("Username creating must fail when trying to create from string which is not starting from @ symbol") { - testUsername.replace("@", "").toUsername().full - } + assertEquals(testUsername, testUsername.replace("@", "").toUsername().full) } @Serializable