1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-03 17:55:52 +03:00

New API methods and payload types (up to Bot API 3.2)

Этот коммит содержится в:
Max Melentiev
2017-08-11 14:21:59 +03:00
родитель 88a4a9aab3
Коммит aaba27eb70
4 изменённых файлов: 55 добавлений и 11 удалений

Просмотреть файл

@@ -108,7 +108,7 @@ RSpec.describe Telegram::Bot::UpdatesController do
end
%w(message channel_post).each do |type|
context 'when payload is edited_message' do
context "when payload is edited_#{type}" do
let(:payload_type) { "edited_#{type}" }
it { should eq [false, payload_type, [payload]] }
end
@@ -142,6 +142,22 @@ RSpec.describe Telegram::Bot::UpdatesController do
end
end
end
custom_payload_types = %w(
message
edited_message
channel_post
edited_channel_post
inline_query
chosen_inline_result
callback_query
)
(described_class::PAYLOAD_TYPES - custom_payload_types).each do |type|
context "when payload is #{type}" do
let(:payload_type) { type }
it { should eq [false, payload_type, [payload]] }
end
end
end
context 'when `update` is a virtus model' do