Skip to content

Commit

Permalink
Allow Call Guid to be passed in via params - allows for reasonable in…
Browse files Browse the repository at this point in the history
…tegration testing
  • Loading branch information
Hemant Bhanoo committed Jun 1, 2010
1 parent 9c07d7c commit 3155572
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/trails/test_helper.rb
Expand Up @@ -107,12 +107,13 @@ def modify_params_with_twilio_opts( params, as_twilio_opts )
from = as_twilio_opts[:from] || '6665554321'
to = as_twilio_opts[:to] || '3334445678'
status = as_twilio_opts[:call_status] || 'in-progress'
guid = as_twilio_opts[ :call_guid ] || 'CA_FAKE_' + SecureRandom.hex( 12 )
params['Caller'] = caller
params['Called'] = called
params['From'] = from
params['To'] = to
params['CallStatus'] = status
params['CallGuid'] = 'CA_FAKE_' + SecureRandom.hex( 12 )
params['CallGuid'] = guid
params['SmsMessageSid'] = 'DummyMessageSid' if( as_twilio_opts[:sms] )
end

Expand Down

0 comments on commit 3155572

Please sign in to comment.