Add SendDocument Test

experimental
Riddler 11 years ago
parent 16b9d2b695
commit ad8bf01f56
  1. 4
      test/index.js

@ -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…
Cancel
Save