1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-04 02:05:52 +03:00
Этот коммит содержится в:
Max Melentiev
2016-05-19 16:29:01 +03:00
родитель 85ff07de9b
Коммит 71f736e0a2
14 изменённых файлов: 421 добавлений и 15 удалений

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

@@ -4,6 +4,7 @@ RSpec.describe Telegram::Bot::Client do
let(:botan_token) { double(:botan_token) }
include_examples 'initializers'
include_examples 'async', request_args: -> { [double(:action), {body: :content}] }
describe '.prepare_body' do
subject { described_class.prepare_body(input) }
@@ -24,6 +25,12 @@ RSpec.describe Telegram::Bot::Client do
end
end
describe '.prepare_async_args' do
subject { described_class.prepare_async_args(*input) }
let(:input) { [:action, a: 1, b: :sym, c: [:other], 'd' => 'str'] }
it { should eq ['action', a: 1, b: 'sym', c: '["other"]', 'd' => 'str'] }
end
describe '.new' do
subject { described_class.new(*args) }