From 618555101fbe8c9286e28a8ae2a94d505d722e84 Mon Sep 17 00:00:00 2001 From: GochoMugo Date: Mon, 10 Oct 2016 12:57:10 +0300 Subject: [PATCH] Fix test for TelegramBot#sendVenue() --- test/index.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/index.js b/test/index.js index 2b82a0a..4ed771d 100644 --- a/test/index.js +++ b/test/index.js @@ -450,7 +450,7 @@ describe('Telegram', function telegramSuite() { }); }); }); - + describe('#sendVenue', function sendVenueSuite() { it('should send a venue', function test() { const bot = new Telegram(TOKEN); @@ -460,11 +460,12 @@ describe('Telegram', function telegramSuite() { 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)); + assert.ok(is.object(resp.venue)); + assert.ok(is.object(resp.venue.location)); + assert.ok(is.number(resp.venue.location.latitude)); + assert.ok(is.number(resp.venue.location.longitude)); + assert.ok(is.string(resp.venue.title)); + assert.ok(is.string(resp.venue.address)); }); }); });