mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +00:00
add test for the sendVenue method
This test uses the same location as the #sendLocation test, while providing info on the venue (The Village Shopping Centre).
This commit is contained in:
parent
9d25ceb3c4
commit
5633aa97bd
@ -394,6 +394,24 @@ describe('Telegram', function telegramSuite() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('#sendVenue', function sendVenueSuite() {
|
||||||
|
it('should send a venue', function test() {
|
||||||
|
const bot = new Telegram(TOKEN);
|
||||||
|
const lat = 47.5351072;
|
||||||
|
const long = -52.7508537;
|
||||||
|
const title = `The Village Shopping Centre`;
|
||||||
|
const address = `430 Topsail Rd,St. John's, NL A1E 4N1, Canada`;
|
||||||
|
return bot.sendVenue(USERID, lat, long, title, address).then(resp => {
|
||||||
|
assert.ok(is.object(resp));
|
||||||
|
assert.ok(is.object(resp.location));
|
||||||
|
assert.ok(is.number(resp.location.latitude));
|
||||||
|
assert.ok(is.number(resp.location.longitude));
|
||||||
|
assert.ok(is.string(resp.title));
|
||||||
|
assert.ok(is.string(resp.address));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('#getFile', function getFileSuite() {
|
describe('#getFile', function getFileSuite() {
|
||||||
let fileId;
|
let fileId;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user