test/twilio/call_test.rb in twilio-2.4.1 vs test/twilio/call_test.rb in twilio-2.5.0
- old
+ new
@@ -18,9 +18,14 @@
should "be made" do
assert_equal stub_response(:post, :call_new, :resource => 'Calls'),
Twilio::Call.make('4158675309', '4155551212', 'http://test.local/call_handler')
end
+ should "be redirected" do
+ assert_equal stub_response(:post, :call_redirected, :resource => 'Calls/CA42ed11f93dc08b952027ffbc406d0868'),
+ Twilio::Call.redirect('CA42ed11f93dc08b952027ffbc406d0868', 'http://www.myapp.com/myhandler.php')
+ end
+
context "with segments" do
should "returns a list of Call resources that were segments created in the same call" do
assert_equal stub_response(:get, :calls, :resource => 'Calls/CA42ed11f93dc08b952027ffbc406d0868/Segments'),
Twilio::Call.segments('CA42ed11f93dc08b952027ffbc406d0868')
end
\ No newline at end of file