mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-28 21:07:39 +00:00
Add SendDocument Test
This commit is contained in:
parent
16b9d2b695
commit
ad8bf01f56
@ -217,7 +217,7 @@ describe('Telegram', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should send a photo from id', function (done) {
|
it('should send a document from id', function (done) {
|
||||||
var bot = new Telegram(TOKEN);
|
var bot = new Telegram(TOKEN);
|
||||||
// Send the same photo as before
|
// Send the same photo as before
|
||||||
var document = documentId;
|
var document = documentId;
|
||||||
@ -227,7 +227,7 @@ describe('Telegram', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should send a photo from fs.readStream', function (done) {
|
it('should send a document from fs.readStream', function (done) {
|
||||||
var bot = new Telegram(TOKEN);
|
var bot = new Telegram(TOKEN);
|
||||||
var document = fs.createReadStream(__dirname+'/bot.gif');
|
var document = fs.createReadStream(__dirname+'/bot.gif');
|
||||||
bot.sendDocument(USERID, document).then(function (resp) {
|
bot.sendDocument(USERID, document).then(function (resp) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user