Skip to content

Commit

Permalink
Merge pull request #1414 from albertsun/feature/twilio-api-deprecation
Browse files Browse the repository at this point in the history
sms.messages is being deprecated from twilio
  • Loading branch information
dsander committed Apr 10, 2016
2 parents 68d9a6a + 11363b4 commit 133af9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/agents/twilio_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def working?
end

def send_message(message)
client.account.sms.messages.create :from => interpolated['sender_cell'],
client.account.messages.create :from => interpolated['sender_cell'],
:to => interpolated['receiver_cell'],
:body => message
end
Expand Down
5 changes: 2 additions & 3 deletions spec/models/agents/twilio_agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
@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
Expand Down Expand Up @@ -51,7 +51,6 @@
@checker.receive([@event])
expect(@checker.memory[:pending_calls]).not_to eq({})
end

end

describe '#working?' do
Expand Down

0 comments on commit 133af9c

Please sign in to comment.