JMongol / twilio-test-toolkit

Twilio Test Toolkit (TTT) makes it easy to write RSpec integration tests for Rails applications that serve Twilio phone callbacks.
MIT License
29 stars 22 forks source link

Add CallStatus to request parameters #9

Closed tadast closed 10 years ago

tadast commented 10 years ago

Twilio always passes CallStatus parameter when following redirects. I added it too. Didn't find a good place to test it, I think it would involve interrogating Capybara a lot. It would also be nice to customize this option in follow_redirect e.g. if there is a Play followed by a Redirect twilio will still follow the redirect if the person hangs up, but the CallStatus will be "completed" instead of "in-progress". Let me know if you want me to add this.

JMongol commented 10 years ago

It definitely needs some kind of test, even if it's just a basic one that fail if someone changes this string. Please add that and then I can merge the request (probably won't be able to until Tuesday as I'm out of town).

I like the idea of customizing this as well; I think it would make it more generally useful.

tadast commented 10 years ago

@JMongol I added some tests that are a bit RSpec-magic-heavy :) Not sure if there is a better way to test this. I also added an optional options parameter that allows to customize some parameters when following redirects.

tadast commented 10 years ago

bump :)

JMongol commented 10 years ago

Sorry for the delay on this - I added a few code comments. Can you clarify these?

tadast commented 10 years ago

I've reverted the whitespace changes. There are a lot of trailing whitespaces in the project, do you want me to submit a separate pull request to remove them?

JMongol commented 10 years ago

If you like you can submit another request for the whitespaces, but I'm not terribly worried about it. I actually don't see any extra ones, although it might be because I just got a new version of TextMate and haven't found the place to turn it on. :D

I'll merge this and publish the new bits shortly.