aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/link.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/link.cpp')
-rw-r--r--test/link.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/link.cpp b/test/link.cpp
index 25d9c6cfe..98549320c 100644
--- a/test/link.cpp
+++ b/test/link.cpp
@@ -345,6 +345,10 @@ static auto chat_invite(const td::string &hash) {
return td::td_api::make_object<td::td_api::internalLinkTypeChatInvite>("tg:join?invite=" + hash);
}
+static auto contacts(const td::string &section) {
+ return td::td_api::make_object<td::td_api::internalLinkTypeContacts>(section);
+}
+
static auto direct_messages_chat(const td::string &channel_username) {
return td::td_api::make_object<td::td_api::internalLinkTypeDirectMessagesChat>(channel_username);
}
@@ -984,6 +988,14 @@ TEST(Link, parse_internal_link_part2) {
parse_internal_link("tg://settings/my-profile/posts/add-album", my_profile("posts/add-album"));
parse_internal_link("tg://settings/my-profile/archived-posts", my_profile("archived-posts"));
+ parse_internal_link("tg://contacts", contacts(""));
+ parse_internal_link("tg://contacts/asdasd", contacts(""));
+ parse_internal_link("tg://contacts/new", contacts("new"));
+ parse_internal_link("tg://contacts/edit", contacts(""));
+ parse_internal_link("tg://contacts/search", contacts("search"));
+ parse_internal_link("tg://contacts/search/search", contacts(""));
+ parse_internal_link("tg://contacts/manage", contacts("manage"));
+
parse_internal_link("tg://new", new_private_chat());
parse_internal_link("tg://new/", new_private_chat());
parse_internal_link("tg://new/asd", unknown_deep_link("tg://new/asd"));