Fix tests for 'full' features

This commit is contained in:
Akshett Rai Jindal 2024-08-21 20:59:45 +05:30
parent 5040813737
commit 336ae4f646
2 changed files with 31 additions and 5 deletions

View file

@ -889,7 +889,6 @@ trait ErasableRequester<'a> {
name: String, name: String,
title: String, title: String,
stickers: Vec<InputSticker>, stickers: Vec<InputSticker>,
sticker_format: StickerFormat,
) -> ErasedRequest<'a, CreateNewStickerSet, Self::Err>; ) -> ErasedRequest<'a, CreateNewStickerSet, Self::Err>;
fn add_sticker_to_set( fn add_sticker_to_set(
@ -910,10 +909,19 @@ trait ErasableRequester<'a> {
sticker: String, sticker: String,
) -> ErasedRequest<'a, DeleteStickerFromSet, Self::Err>; ) -> ErasedRequest<'a, DeleteStickerFromSet, Self::Err>;
fn replace_sticker_in_set(
&self,
user_id: UserId,
name: String,
old_sticker: String,
sticker: InputSticker,
) -> ErasedRequest<'a, ReplaceStickerInSet, Self::Err>;
fn set_sticker_set_thumbnail( fn set_sticker_set_thumbnail(
&self, &self,
name: String, name: String,
user_id: UserId, user_id: UserId,
format: StickerFormat,
) -> ErasedRequest<'a, SetStickerSetThumbnail, Self::Err>; ) -> ErasedRequest<'a, SetStickerSetThumbnail, Self::Err>;
fn set_custom_emoji_sticker_set_thumbnail( fn set_custom_emoji_sticker_set_thumbnail(
@ -1806,10 +1814,8 @@ where
name: String, name: String,
title: String, title: String,
stickers: Vec<InputSticker>, stickers: Vec<InputSticker>,
sticker_format: StickerFormat,
) -> ErasedRequest<'a, CreateNewStickerSet, Self::Err> { ) -> ErasedRequest<'a, CreateNewStickerSet, Self::Err> {
Requester::create_new_sticker_set(self, user_id, name, title, stickers, sticker_format) Requester::create_new_sticker_set(self, user_id, name, title, stickers).erase()
.erase()
} }
fn add_sticker_to_set( fn add_sticker_to_set(
@ -1836,12 +1842,23 @@ where
Requester::delete_sticker_from_set(self, sticker).erase() Requester::delete_sticker_from_set(self, sticker).erase()
} }
fn replace_sticker_in_set(
&self,
user_id: UserId,
name: String,
old_sticker: String,
sticker: InputSticker,
) -> ErasedRequest<'a, ReplaceStickerInSet, Self::Err> {
Requester::replace_sticker_in_set(self, user_id, name, old_sticker, sticker).erase()
}
fn set_sticker_set_thumbnail( fn set_sticker_set_thumbnail(
&self, &self,
name: String, name: String,
user_id: UserId, user_id: UserId,
format: StickerFormat,
) -> ErasedRequest<'a, SetStickerSetThumbnail, Self::Err> { ) -> ErasedRequest<'a, SetStickerSetThumbnail, Self::Err> {
Requester::set_sticker_set_thumbnail(self, name, user_id).erase() Requester::set_sticker_set_thumbnail(self, name, user_id, format).erase()
} }
fn set_custom_emoji_sticker_set_thumbnail( fn set_custom_emoji_sticker_set_thumbnail(

View file

@ -189,6 +189,8 @@ mod tests {
}), }),
sender_chat: None, sender_chat: None,
is_topic_message: false, is_topic_message: false,
sender_business_bot: None,
business_connection_id: None,
date, date,
chat: Chat { chat: Chat {
id: ChatId(109_998_024), id: ChatId(109_998_024),
@ -199,6 +201,11 @@ mod tests {
bio: None, bio: None,
has_private_forwards: None, has_private_forwards: None,
has_restricted_voice_and_video_messages: None, has_restricted_voice_and_video_messages: None,
business_intro: None,
business_location: None,
business_opening_hours: None,
birthdate: None,
personal_chat: None,
}), }),
photo: None, photo: None,
available_reactions: None, available_reactions: None,
@ -231,6 +238,7 @@ mod tests {
has_protected_content: false, has_protected_content: false,
reply_to_story: None, reply_to_story: None,
sender_boost_count: None, sender_boost_count: None,
is_from_offline: false,
}), }),
}), }),
} }
@ -251,6 +259,7 @@ mod tests {
can_join_groups: false, can_join_groups: false,
can_read_all_group_messages: false, can_read_all_group_messages: false,
supports_inline_queries: false, supports_inline_queries: false,
can_connect_to_business: false,
} }
} }