mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-31 06:16:07 +00:00
src: Support file options, defaults in sending files
This commit is contained in:
@@ -630,13 +630,6 @@ describe('TelegramBot', function telegramSuite() {
|
||||
assert.ok(is.object(resp.document));
|
||||
});
|
||||
});
|
||||
it('should send a document with custom file options', function test() {
|
||||
const document = fs.createReadStream(`${__dirname}/data/photo.gif`);
|
||||
const fileOpts = { filename: 'customfilename.gif' };
|
||||
return bot.sendDocument(USERID, document, {}, fileOpts).then(resp => {
|
||||
assert.equal(resp.document.file_name, fileOpts.filename);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('#sendSticker', function sendStickerSuite() {
|
||||
|
Reference in New Issue
Block a user