No description provided.
Better test to ensure that query strings are not being rewritten. The…
… previous version of this test would pass on revision 8153c07 with Ruby 1.9 due to ordered hashes; this one checks both argument order and URL-encoding.
Thanks for the PR. Looks good, but can you help me understand the motivation. Did you run into a bug here?
The test should make sure that the order of arguments is not changed from the original query string. I was doing my original testing on Ruby 1.8.7, which uses unordered hashes, so if my arguments were split up into a hash, they got randomized, causing the test to fail with high probability, as desired. In 1.9, the hashes are ordered, which I believe results in an alphabetically-ordered list of params. Since my original simple query string was already in alphabetical order, it did not get rearranged, making it a useless test on 1.9.
This new version uses a query string with arguments that are not in alphabetical order, so it should be more rigorous. Also, I added the +%20 to test whether any kind of URL-decoding/encoding is being applied, which catches it even if the argument order does not change.