2
0
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:
GochoMugo
2017-11-16 20:27:17 +03:00
parent fb1f4344b3
commit d6083e4327
6 changed files with 275 additions and 80 deletions

View File

@@ -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() {