mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-30 05:48:00 +00:00
test: Fix test for TelegramBot#setChatDescription()
Bug: We MUST ensure we update the description. If the description is unchanged, an error is thrown by the API. Fix: Append a random number to the description.
This commit is contained in:
parent
96b90c2d56
commit
8ed0a2dcef
@ -887,7 +887,9 @@ describe('TelegramBot', function telegramSuite() {
|
||||
utils.handleRatelimit(bot, 'setChatDescription', this);
|
||||
});
|
||||
it('should set the chat description', function test() {
|
||||
return bot.setChatDescription(GROUPID, 'node-telegram-bot-api test group').then(resp => {
|
||||
const random = Math.floor(Math.random() * 1000);
|
||||
const description = `node-telegram-bot-api test group (random: ${random})`;
|
||||
return bot.setChatDescription(GROUPID, description).then(resp => {
|
||||
assert.equal(resp, true);
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user