mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
update twilio agent spec to ensure proper twilio rest api calls are made
This commit is contained in:
parent
97d7c799bb
commit
11363b4b03
1 changed files with 2 additions and 3 deletions
|
@ -20,8 +20,8 @@ describe Agents::TwilioAgent do
|
|||
@event.save!
|
||||
|
||||
@sent_messages = []
|
||||
stub.any_instance_of(Agents::TwilioAgent).send_message { |message| @sent_messages << message}
|
||||
stub.any_instance_of(Agents::TwilioAgent).make_call {}
|
||||
stub.any_instance_of(Twilio::REST::Messages).create { |message| @sent_messages << message[:body]}
|
||||
stub.any_instance_of(Twilio::REST::Calls).create
|
||||
end
|
||||
|
||||
describe '#receive' do
|
||||
|
@ -51,7 +51,6 @@ describe Agents::TwilioAgent do
|
|||
@checker.receive([@event])
|
||||
expect(@checker.memory[:pending_calls]).not_to eq({})
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe '#working?' do
|
||||
|
|
Loading…
Add table
Reference in a new issue