mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 06:25:10 +01:00
Fix tests for 'full' features
This commit is contained in:
parent
5040813737
commit
336ae4f646
2 changed files with 31 additions and 5 deletions
|
@ -889,7 +889,6 @@ trait ErasableRequester<'a> {
|
|||
name: String,
|
||||
title: String,
|
||||
stickers: Vec<InputSticker>,
|
||||
sticker_format: StickerFormat,
|
||||
) -> ErasedRequest<'a, CreateNewStickerSet, Self::Err>;
|
||||
|
||||
fn add_sticker_to_set(
|
||||
|
@ -910,10 +909,19 @@ trait ErasableRequester<'a> {
|
|||
sticker: String,
|
||||
) -> 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(
|
||||
&self,
|
||||
name: String,
|
||||
user_id: UserId,
|
||||
format: StickerFormat,
|
||||
) -> ErasedRequest<'a, SetStickerSetThumbnail, Self::Err>;
|
||||
|
||||
fn set_custom_emoji_sticker_set_thumbnail(
|
||||
|
@ -1806,10 +1814,8 @@ where
|
|||
name: String,
|
||||
title: String,
|
||||
stickers: Vec<InputSticker>,
|
||||
sticker_format: StickerFormat,
|
||||
) -> ErasedRequest<'a, CreateNewStickerSet, Self::Err> {
|
||||
Requester::create_new_sticker_set(self, user_id, name, title, stickers, sticker_format)
|
||||
.erase()
|
||||
Requester::create_new_sticker_set(self, user_id, name, title, stickers).erase()
|
||||
}
|
||||
|
||||
fn add_sticker_to_set(
|
||||
|
@ -1836,12 +1842,23 @@ where
|
|||
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(
|
||||
&self,
|
||||
name: String,
|
||||
user_id: UserId,
|
||||
format: StickerFormat,
|
||||
) -> 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(
|
||||
|
|
|
@ -189,6 +189,8 @@ mod tests {
|
|||
}),
|
||||
sender_chat: None,
|
||||
is_topic_message: false,
|
||||
sender_business_bot: None,
|
||||
business_connection_id: None,
|
||||
date,
|
||||
chat: Chat {
|
||||
id: ChatId(109_998_024),
|
||||
|
@ -199,6 +201,11 @@ mod tests {
|
|||
bio: None,
|
||||
has_private_forwards: 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,
|
||||
available_reactions: None,
|
||||
|
@ -231,6 +238,7 @@ mod tests {
|
|||
has_protected_content: false,
|
||||
reply_to_story: None,
|
||||
sender_boost_count: None,
|
||||
is_from_offline: false,
|
||||
}),
|
||||
}),
|
||||
}
|
||||
|
@ -251,6 +259,7 @@ mod tests {
|
|||
can_join_groups: false,
|
||||
can_read_all_group_messages: false,
|
||||
supports_inline_queries: false,
|
||||
can_connect_to_business: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue