diff --git a/.travis.yml b/.travis.yml index 12d9aba..955d393 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,9 @@ node_js: - "8" - "7" - "6" - - "5" - - "4" - # - "0.12" +script: + - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./travis/run_on_pull_requests; fi' + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./travis/run_on_non_pull_requests; fi' after_success: - bash <(curl -s https://codecov.io/bash) cache: diff --git a/test/telegram.js b/test/telegram.js index b1f98f1..c943d63 100644 --- a/test/telegram.js +++ b/test/telegram.js @@ -1057,7 +1057,13 @@ describe('TelegramBot', function telegramSuite() { return bot.sendLocation(USERID, lat, long, opts).then(resp => { message = resp; }); }); it('edits live location', function test() { - const opts = { chat_id: USERID, message_id: message.message_id }; + const replyMarkup = JSON.stringify({ + inline_keyboard: [[{ + text: 'Test button', + callback_data: 'test' + }]] + }); + const opts = { chat_id: USERID, message_id: message.message_id, reply_markup: replyMarkup }; return bot.editMessageLiveLocation(lat + 1, long + 1, opts).then(resp => { assert.ok(is.object(resp)); assert.ok(is.object(resp.location)); @@ -1074,7 +1080,13 @@ describe('TelegramBot', function telegramSuite() { return bot.sendLocation(USERID, lat, long, { live_period: 86400 }) .then((resp) => { message = resp; - const opts = { chat_id: USERID, message_id: message.message_id }; + const replyMarkup = JSON.stringify({ + inline_keyboard: [[{ + text: 'Test button', + callback_data: 'test' + }]] + }); + const opts = { chat_id: USERID, message_id: message.message_id, reply_markup: replyMarkup }; return bot.editMessageLiveLocation(lat + 1, long + 1, opts); }); }); @@ -1367,7 +1379,7 @@ describe('TelegramBot', function telegramSuite() { const payload = 'sku-p001'; const providerToken = PROVIDER_TOKEN; const startParameter = 'pay'; - const currency = 'KES'; + const currency = 'USD'; const prices = [{ label: 'product', amount: 11000 }, { label: 'tax', amount: 11000 }]; return bot.sendInvoice(USERID, title, description, payload, providerToken, startParameter, currency, prices).then(resp => { assert.ok(is.object(resp));