-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it easier/possible to test REST API-initiated calls #12
Open
pgib
wants to merge
12
commits into
JMongol:master
Choose a base branch
from
pgib:rest-api-simulation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ST API, we should be able to see the Direction and Called parameters coming through. :called and :direction have been added as recognized options for ttt_call.
…the `method` attribute are `GET` and `POST`; however, if you generate TwiML with these exact strings, like: Twilio::TwiML::Response.new do |r| r.Dial :method => 'GET', :action => '...' you'll end up with the following error when testing: undefined method `GET' for #<Capybara::RackTest::Driver:0x007fc95e819758> While you could go and rewrite everything to be :method => 'get', we'll just make things easier on ourselves by catching this before we send it to the Capybara driver.
…l.called, call.direction).
…l! Some were lost in CallInProgress (i.e. :call_status).
Any chance this could be looked at to be incorporated? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Calls originating from the Twilio REST API include a
Called
parameter. (It seems the same asTo
, but it's only there in that sort of call.) TheDirection
is alsooutbound-api
, and so we can now run tests that include both of these parameters:It's also now possible to pass in a different :call_status in order to test on changes there.