twilio-test-toolkit 3.2.1 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,18 +8,18 @@ module TwilioTestToolkit
8
8
  return normalize_redirect_path(el.text) == normalize_redirect_path(url)
9
9
  end
10
10
 
11
- def follow_redirect
11
+ def follow_redirect(options = {})
12
12
  el = get_redirect_node
13
13
  raise "No redirect" if el.nil?
14
14
 
15
- return CallScope.from_request(self, el.text, :method =>el[:method])
15
+ return CallScope.from_request(self, el.text, { :method =>el[:method]}.merge(options))
16
16
  end
17
17
 
18
- def follow_redirect!
18
+ def follow_redirect!(options = {})
19
19
  el = get_redirect_node
20
20
  raise "No redirect" if el.nil?
21
21
 
22
- request_for_twiml!(normalize_redirect_path(el.text), :method => el[:method])
22
+ request_for_twiml!(normalize_redirect_path(el.text), { :method => el[:method] }.merge(options))
23
23
  end
24
24
 
25
25
  # Stuff for Says
@@ -156,7 +156,7 @@ module TwilioTestToolkit
156
156
  def self.from_request(parent, path, options = {})
157
157
  new_scope = CallScope.new
158
158
  new_scope.send(:root_call=, parent.root_call)
159
- new_scope.send(:request_for_twiml!, path, :digits => options[:digits] || "", :method => options[:method] || :post)
159
+ new_scope.send(:request_for_twiml!, path, options)
160
160
  return new_scope
161
161
  end
162
162
 
@@ -180,9 +180,10 @@ module TwilioTestToolkit
180
180
  :format => :xml,
181
181
  :CallSid => @root_call.sid,
182
182
  :From => @root_call.from_number,
183
- :Digits => formatted_digits(options[:digits], :finish_on_key => options[:finish_on_key]),
183
+ :Digits => formatted_digits(options[:digits].to_s, :finish_on_key => options[:finish_on_key]),
184
184
  :To => @root_call.to_number,
185
- :AnsweredBy => (options[:is_machine] ? "machine" : "human")
185
+ :AnsweredBy => (options[:is_machine] ? "machine" : "human"),
186
+ :CallStatus => options.fetch(:call_status, "in-progress")
186
187
  )
187
188
 
188
189
  # All Twilio responses must be a success.
@@ -199,4 +200,4 @@ module TwilioTestToolkit
199
200
  @root_call = val
200
201
  end
201
202
  end
202
- end
203
+ end
@@ -1,3 +1,3 @@
1
1
  module TwilioTestToolkit
2
- VERSION = "3.2.1"
2
+ VERSION = "3.3.0"
3
3
  end
@@ -2384,3 +2384,241 @@ Started GET "/twilio/test_start?format=xml&CallSid=1234567&From=2065551212&Digit
2384
2384
  Processing by TwilioController#test_start as XML
2385
2385
  Parameters: {"CallSid"=>"1234567", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"machine"}
2386
2386
  Completed 200 OK in 0ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2387
+ Connecting to database specified by database.yml
2388
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2389
+ Processing by TwilioController#test_start as XML
2390
+ Parameters: {"CallSid"=>"f8ae7368-ea58-49b7-b9f3-f086f4f641fa", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2391
+ Rendered twilio/test_start.xml.erb within layouts/twilio.layout (2.2ms)
2392
+ Completed 200 OK in 32ms (Views: 32.0ms | ActiveRecord: 0.0ms)
2393
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2394
+ Processing by TwilioController#test_start as XML
2395
+ Parameters: {"CallSid"=>"84815104-9f9c-41f9-8604-dd2d6e4c64ff", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2396
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2397
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2398
+ Processing by TwilioController#test_start as XML
2399
+ Parameters: {"CallSid"=>"35c7c647-695f-4108-9946-d16b508f7fa6", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2400
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2401
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2402
+ Processing by TwilioController#test_start as XML
2403
+ Parameters: {"CallSid"=>"b2c16a15-3c1f-4358-971f-57063138cf40", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2404
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2405
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2406
+ Processing by TwilioController#test_start as XML
2407
+ Parameters: {"CallSid"=>"20031c63-cbeb-4011-8a27-5170ce4b9290", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2408
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2409
+ Started POST "/twilio/test_redirect" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2410
+ Processing by TwilioController#test_redirect as XML
2411
+ Parameters: {"CallSid"=>"f5c4d807-104c-4359-bb18-1bc8a7f89ece", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2412
+ Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)
2413
+ Started POST "/twilio/test_redirect" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2414
+ Processing by TwilioController#test_redirect as XML
2415
+ Parameters: {"CallSid"=>"7cbca497-44d0-4c7c-94ec-2170ff72b55f", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2416
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
2417
+ Started POST "/twilio/test_redirect" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2418
+ Processing by TwilioController#test_redirect as XML
2419
+ Parameters: {"CallSid"=>"dbe8deac-0aa6-44d2-8d1e-9b69f300615d", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2420
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2421
+ Started POST "/twilio/test_redirect" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2422
+ Processing by TwilioController#test_redirect as XML
2423
+ Parameters: {"CallSid"=>"c2124b3e-6722-403a-b81e-cc7873feabcd", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2424
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2425
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2426
+ Processing by TwilioController#test_start as XML
2427
+ Parameters: {"CallSid"=>"c2124b3e-6722-403a-b81e-cc7873feabcd", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2428
+ Completed 200 OK in 0ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2429
+ Started POST "/twilio/test_redirect" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2430
+ Processing by TwilioController#test_redirect as XML
2431
+ Parameters: {"CallSid"=>"4b06e0c7-2a4e-4d3c-a230-649c5f69f081", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2432
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2433
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2434
+ Processing by TwilioController#test_start as XML
2435
+ Parameters: {"CallSid"=>"4b06e0c7-2a4e-4d3c-a230-649c5f69f081", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2436
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
2437
+ Started POST "/twilio/test_redirect" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2438
+ Processing by TwilioController#test_redirect as XML
2439
+ Parameters: {"CallSid"=>"8c28bebe-c63f-4c0c-92a5-8afea44066be", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2440
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
2441
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2442
+ Processing by TwilioController#test_start as XML
2443
+ Parameters: {"CallSid"=>"8c28bebe-c63f-4c0c-92a5-8afea44066be", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2444
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
2445
+ Started POST "/twilio/test_redirect" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2446
+ Processing by TwilioController#test_redirect as XML
2447
+ Parameters: {"CallSid"=>"e6836936-f9b1-42e7-9e5c-8ab6e7d7b6d6", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2448
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
2449
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2450
+ Processing by TwilioController#test_start as XML
2451
+ Parameters: {"CallSid"=>"e6836936-f9b1-42e7-9e5c-8ab6e7d7b6d6", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"completed"}
2452
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
2453
+ Started POST "/twilio/test_redirect" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2454
+ Processing by TwilioController#test_redirect as XML
2455
+ Parameters: {"CallSid"=>"ba24a23d-1e07-4622-b864-fffb72841354", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2456
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
2457
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2458
+ Processing by TwilioController#test_start as XML
2459
+ Parameters: {"CallSid"=>"ba24a23d-1e07-4622-b864-fffb72841354", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"completed"}
2460
+ Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
2461
+ Started POST "/twilio/test_say" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2462
+ Processing by TwilioController#test_say as XML
2463
+ Parameters: {"CallSid"=>"60ff2eb5-416f-4c22-8cfd-84e5ca93a150", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2464
+ Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
2465
+ Started POST "/twilio/test_say" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2466
+ Processing by TwilioController#test_say as XML
2467
+ Parameters: {"CallSid"=>"ce7f7856-c63c-42a6-bc67-0e9e27897052", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2468
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2469
+ Started POST "/twilio/test_say" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2470
+ Processing by TwilioController#test_say as XML
2471
+ Parameters: {"CallSid"=>"a6ebaa61-6f9f-4649-96ba-63672d632ec4", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2472
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2473
+ Started POST "/twilio/test_say" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2474
+ Processing by TwilioController#test_say as XML
2475
+ Parameters: {"CallSid"=>"899bc765-170a-480f-8468-397b9f1d10d2", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2476
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2477
+ Started POST "/twilio/test_say" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2478
+ Processing by TwilioController#test_say as XML
2479
+ Parameters: {"CallSid"=>"048663c4-196e-4ecc-a179-714e610ea0e8", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2480
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2481
+ Started POST "/twilio/test_say" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2482
+ Processing by TwilioController#test_say as XML
2483
+ Parameters: {"CallSid"=>"0937fda0-b45a-4c6e-a251-85dc25c8f57c", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2484
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2485
+ Started POST "/twilio/test_play" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2486
+ Processing by TwilioController#test_play as XML
2487
+ Parameters: {"CallSid"=>"fd200d81-49d8-4b5e-a787-c21bb5d247ac", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2488
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
2489
+ Started POST "/twilio/test_play" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2490
+ Processing by TwilioController#test_play as XML
2491
+ Parameters: {"CallSid"=>"bac85d86-12ed-472d-ab53-770abe2cf84c", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2492
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2493
+ Started POST "/twilio/test_dial_with_action" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2494
+ Processing by TwilioController#test_dial_with_action as XML
2495
+ Parameters: {"CallSid"=>"223b8116-614c-43be-8caf-93f375bc019e", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2496
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
2497
+ Started POST "/twilio/test_dial_with_action" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2498
+ Processing by TwilioController#test_dial_with_action as XML
2499
+ Parameters: {"CallSid"=>"1740cfae-d696-4e8d-a5c8-2fa630600a6a", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2500
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2501
+ Started POST "/twilio/test_dial_with_action" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2502
+ Processing by TwilioController#test_dial_with_action as XML
2503
+ Parameters: {"CallSid"=>"4ab84ca0-7d27-4bbf-8617-123ce6ac40c9", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2504
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2505
+ Started POST "/twilio/test_dial_with_no_action" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2506
+ Processing by TwilioController#test_dial_with_no_action as XML
2507
+ Parameters: {"CallSid"=>"5ed40152-9a00-4923-b598-d01c80adac7e", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2508
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
2509
+ Started POST "/twilio/test_dial_with_action" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2510
+ Processing by TwilioController#test_dial_with_action as XML
2511
+ Parameters: {"CallSid"=>"8c19e7fe-6501-4ead-95af-541720810ceb", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2512
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2513
+ Started POST "/twilio/test_dial_with_action" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2514
+ Processing by TwilioController#test_dial_with_action as XML
2515
+ Parameters: {"CallSid"=>"8a2029fa-9844-4b49-88f5-475e41b1a8b6", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2516
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2517
+ Started POST "/twilio/test_hangup" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2518
+ Processing by TwilioController#test_hangup as XML
2519
+ Parameters: {"CallSid"=>"4e2ecbb2-fa60-4d91-9a8b-ae0555ccde80", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2520
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
2521
+ Started POST "/twilio/test_hangup" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2522
+ Processing by TwilioController#test_hangup as XML
2523
+ Parameters: {"CallSid"=>"7ddf9f9a-c61b-4f88-bf4e-77f50e027252", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2524
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2525
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2526
+ Processing by TwilioController#test_start as XML
2527
+ Parameters: {"CallSid"=>"5f32c6a0-d2a2-4afe-9bea-0fc506705754", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2528
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2529
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2530
+ Processing by TwilioController#test_start as XML
2531
+ Parameters: {"CallSid"=>"b9d28535-378f-4186-ae27-05c0ac853a79", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2532
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2533
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2534
+ Processing by TwilioController#test_start as XML
2535
+ Parameters: {"CallSid"=>"50fdcb99-aa93-405f-b722-69c1295e0d46", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2536
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2537
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2538
+ Processing by TwilioController#test_start as XML
2539
+ Parameters: {"CallSid"=>"93cdbdda-6eef-49c8-885a-f0036c133268", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2540
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2541
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2542
+ Processing by TwilioController#test_start as XML
2543
+ Parameters: {"CallSid"=>"cee05ccb-e0e2-4821-8c2c-fcf560a15b02", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2544
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2545
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2546
+ Processing by TwilioController#test_start as XML
2547
+ Parameters: {"CallSid"=>"ceed6e2b-8c82-4987-9dd7-7b38a25d85e2", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2548
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2549
+ Started POST "/twilio/test_action" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2550
+ Processing by TwilioController#test_action as XML
2551
+ Parameters: {"CallSid"=>"ceed6e2b-8c82-4987-9dd7-7b38a25d85e2", "From"=>"2065551212", "Digits"=>"98765", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2552
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
2553
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2554
+ Processing by TwilioController#test_start as XML
2555
+ Parameters: {"CallSid"=>"84226373-8c6c-481c-a461-cede4a5e28cb", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2556
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2557
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2558
+ Processing by TwilioController#test_start as XML
2559
+ Parameters: {"CallSid"=>"f38c7571-8e28-46f9-a005-d7df7ea3a441", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2560
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2561
+ Started POST "/twilio/test_action" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2562
+ Processing by TwilioController#test_action as XML
2563
+ Parameters: {"CallSid"=>"f38c7571-8e28-46f9-a005-d7df7ea3a441", "From"=>"2065551212", "Digits"=>"98765", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2564
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2565
+ Started POST "/twilio/test_gather_finish_on_asterisk" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2566
+ Processing by TwilioController#test_gather_finish_on_asterisk as XML
2567
+ Parameters: {"CallSid"=>"d7c70b41-bf37-416b-94f9-8e556f0e94eb", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2568
+ Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
2569
+ Started POST "/twilio/test_action" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2570
+ Processing by TwilioController#test_action as XML
2571
+ Parameters: {"CallSid"=>"d7c70b41-bf37-416b-94f9-8e556f0e94eb", "From"=>"2065551212", "Digits"=>"98765", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2572
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2573
+ Started POST "/twilio/test_gather_finish_on_asterisk" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2574
+ Processing by TwilioController#test_gather_finish_on_asterisk as XML
2575
+ Parameters: {"CallSid"=>"266c9bc1-0218-4613-8d76-07478c168d9d", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2576
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2577
+ Started POST "/twilio/test_action" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2578
+ Processing by TwilioController#test_action as XML
2579
+ Parameters: {"CallSid"=>"266c9bc1-0218-4613-8d76-07478c168d9d", "From"=>"2065551212", "Digits"=>"98765", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2580
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2581
+ Started POST "/twilio/test_say" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2582
+ Processing by TwilioController#test_say as XML
2583
+ Parameters: {"CallSid"=>"77da415e-a129-4c10-b3db-1d792eed8308", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2584
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2585
+ Started POST "/twilio/test_say" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2586
+ Processing by TwilioController#test_say as XML
2587
+ Parameters: {"CallSid"=>"0f4fbcbb-bcaa-4866-a166-08d76eca7685", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2588
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2589
+ Started POST "/twilio/test_say" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2590
+ Processing by TwilioController#test_say as XML
2591
+ Parameters: {"CallSid"=>"c228f1c8-5b60-4522-8eb5-991f8db4e6a8", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2592
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2593
+ Started POST "/twilio/test_say" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2594
+ Processing by TwilioController#test_say as XML
2595
+ Parameters: {"CallSid"=>"cb1dd37a-6dd9-4153-84ab-5defa17b6395", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2596
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2597
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2598
+ Processing by TwilioController#test_start as XML
2599
+ Parameters: {"CallSid"=>"92f2a7db-2893-471e-aa64-c0176bb31501", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2600
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2601
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2602
+ Processing by TwilioController#test_start as XML
2603
+ Parameters: {"CallSid"=>"0aecedb2-251d-41e8-b760-af95b3dcec67", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2604
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2605
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2606
+ Processing by TwilioController#test_start as XML
2607
+ Parameters: {"CallSid"=>"e2486d4b-a368-46e1-a7b5-b895f052b7fe", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2608
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2609
+ Started POST "/twilio/test_start" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2610
+ Processing by TwilioController#test_start as XML
2611
+ Parameters: {"CallSid"=>"655795c7-8ed0-4ca3-b0a2-610dd19420de", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"human", "CallStatus"=>"in-progress"}
2612
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2613
+ Started GET "/twilio/test_start?format=xml&CallSid=1234567&From=2065551212&Digits=&To=2065553434&AnsweredBy=machine&CallStatus=in-progress" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2614
+ Processing by TwilioController#test_start as XML
2615
+ Parameters: {"CallSid"=>"1234567", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"machine", "CallStatus"=>"in-progress"}
2616
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
2617
+ Started GET "/twilio/test_start?format=xml&CallSid=1234567&From=2065551212&Digits=&To=2065553434&AnsweredBy=machine&CallStatus=in-progress" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2618
+ Processing by TwilioController#test_start as XML
2619
+ Parameters: {"CallSid"=>"1234567", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"machine", "CallStatus"=>"in-progress"}
2620
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2621
+ Started GET "/twilio/test_start?format=xml&CallSid=1234567&From=2065551212&Digits=&To=2065553434&AnsweredBy=machine&CallStatus=in-progress" for 127.0.0.1 at 2013-11-20 19:57:48 -0800
2622
+ Processing by TwilioController#test_start as XML
2623
+ Parameters: {"CallSid"=>"1234567", "From"=>"2065551212", "Digits"=>"", "To"=>"2065553434", "AnsweredBy"=>"machine", "CallStatus"=>"in-progress"}
2624
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
@@ -80,8 +80,43 @@ describe TwilioTestToolkit::CallScope do
80
80
  # Make sure it followed
81
81
  @call.current_path.should == test_start_twilio_index_path
82
82
  end
83
+
84
+ it "should submit default params on follow_redirect" do
85
+ default_request_params = {
86
+ :format => :xml,
87
+ :From => "2065551212",
88
+ :Digits => "",
89
+ :To => "2065553434",
90
+ :AnsweredBy => "human",
91
+ :CallStatus => "in-progress"
92
+ }
93
+ Capybara.current_session.driver
94
+ .should_receive(:post)
95
+ .with("/twilio/test_start", hash_including(default_request_params))
96
+ .and_call_original
97
+
98
+ @call.follow_redirect
99
+ end
100
+
101
+ it "should consider options for follow_redirect!" do
102
+ Capybara.current_session.driver
103
+ .should_receive(:post)
104
+ .with("/twilio/test_start", hash_including(:CallStatus => "completed"))
105
+ .and_call_original
106
+
107
+ @call.follow_redirect!(call_status: "completed")
108
+ end
109
+
110
+ it "should consider options for follow_redirect" do
111
+ Capybara.current_session.driver
112
+ .should_receive(:post)
113
+ .with("/twilio/test_start", hash_including(:CallStatus => "completed"))
114
+ .and_call_original
115
+
116
+ @call.follow_redirect(call_status: "completed")
117
+ end
83
118
  end
84
-
119
+
85
120
  describe "failure" do
86
121
  before(:each) do
87
122
  # Initiate a call that's not on a redirect - various calls will fail
@@ -315,4 +350,4 @@ describe TwilioTestToolkit::CallScope do
315
350
  end
316
351
  end
317
352
  end
318
- end
353
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-test-toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-11 00:00:00.000000000 Z
12
+ date: 2013-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capybara