Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Resolving test problems on query params order generation by using cor… #64

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

edmondop
Copy link

This resolves the problem that test would fail in some organization due to order of generation of query parameters.

If one runs for example Twilio_TestPhoneNumbers.testTwilioAvailablePhoneNumbers_AreaCodeFilter

on an organization where tests fail, one can read on the log

15:25:48:017 USER_DEBUG [98]|DEBUG|Twilio_TestHTTPMock::putResponse() Added resource GET HTTPS://API.TWILIO.COM/2010-04-01/ACCOUNTS/ACBA8BC05EACF94AFDAE398E642C9CC32D/AVAILABLEPHONENUMBERS/US/LOCAL.JSON?AREACODE=510&CONTAINS=51034*****

....
15:25:48:264 USER_DEBUG [77]|DEBUG|Twilio_TestHTTPMock::getResponse() Did not find Resource for GET https://api.twilio.com/2010-04-01/Accounts/ACba8bc05eacf94afdae398e642c9cc32d/AvailablePhoneNumbers/US/Local.json?Contains=51034*****&AreaCode=510

As you can see the order of the query parameters AreaCode/Contains is inverted and therefore it fails to find the resource and answer with a 404

screen shot 2017-10-10 at 16 05 59

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant