mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 05:17:41 +00:00
test: Add test for TelegramBot#sendDocument() using 'fileOpts' param
References: * Original PR: https://github.com/yagop/node-telegram-bot-api/pull/152 * Original Author: @evolun
This commit is contained in:
parent
9d12bdfa41
commit
14f37c7181
@ -522,6 +522,13 @@ describe('TelegramBot', function telegramSuite() {
|
|||||||
assert.ok(is.object(resp.document));
|
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() {
|
describe('#sendSticker', function sendStickerSuite() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user